@@ -98,19 +98,19 @@ class Categories extends AbstractModifier
98
98
* @param DbHelper $dbHelper
99
99
* @param UrlInterface $urlBuilder
100
100
* @param ArrayManager $arrayManager
101
- * @param Session $session
102
101
* @param SerializerInterface $serializer
103
102
* @param AuthorizationInterface $authorization
103
+ * @param Session $session
104
104
*/
105
105
public function __construct (
106
106
LocatorInterface $ locator ,
107
107
CategoryCollectionFactory $ categoryCollectionFactory ,
108
108
DbHelper $ dbHelper ,
109
109
UrlInterface $ urlBuilder ,
110
110
ArrayManager $ arrayManager ,
111
- Session $ session ,
112
111
SerializerInterface $ serializer = null ,
113
- AuthorizationInterface $ authorization = null
112
+ AuthorizationInterface $ authorization = null ,
113
+ Session $ session = null
114
114
) {
115
115
$ this ->locator = $ locator ;
116
116
$ this ->categoryCollectionFactory = $ categoryCollectionFactory ;
@@ -119,7 +119,7 @@ public function __construct(
119
119
$ this ->arrayManager = $ arrayManager ;
120
120
$ this ->serializer = $ serializer ?: ObjectManager::getInstance ()->get (SerializerInterface::class);
121
121
$ this ->authorization = $ authorization ?: ObjectManager::getInstance ()->get (AuthorizationInterface::class);
122
- $ this ->session = $ session ;
122
+ $ this ->session = $ session ?: ObjectManager:: getInstance ()-> get (Session::class) ;
123
123
}
124
124
125
125
/**
0 commit comments