File tree Expand file tree Collapse file tree 15 files changed +26
-55
lines changed
ResourceModel/PostHistory
view/adminhtml/web/category Expand file tree Collapse file tree 15 files changed +26
-55
lines changed Original file line number Diff line number Diff line change @@ -38,5 +38,5 @@ public function getItems();
38
38
* @param \Mageplaza\Blog\Api\Data\CategoryInterface[] $items
39
39
* @return $this
40
40
*/
41
- public function setItems (array $ items = null );
41
+ public function setItems (? array $ items = null );
42
42
}
Original file line number Diff line number Diff line change @@ -38,5 +38,5 @@ public function getItems();
38
38
* @param \Mageplaza\Blog\Api\Data\CommentInterface[] $items
39
39
* @return $this
40
40
*/
41
- public function setItems (array $ items = null );
41
+ public function setItems (? array $ items = null );
42
42
}
Original file line number Diff line number Diff line change @@ -38,5 +38,5 @@ public function getItems();
38
38
* @param \Mageplaza\Blog\Api\Data\PostInterface[] $items
39
39
* @return $this
40
40
*/
41
- public function setItems (array $ items = null );
41
+ public function setItems (? array $ items = null );
42
42
}
Original file line number Diff line number Diff line change @@ -38,5 +38,5 @@ public function getItems();
38
38
* @param \Mageplaza\Blog\Api\Data\TagInterface[] $items
39
39
* @return $this
40
40
*/
41
- public function setItems (array $ items = null );
41
+ public function setItems (? array $ items = null );
42
42
}
Original file line number Diff line number Diff line change @@ -38,5 +38,5 @@ public function getItems();
38
38
* @param \Mageplaza\Blog\Api\Data\TopicInterface[] $items
39
39
* @return $this
40
40
*/
41
- public function setItems (array $ items = null );
41
+ public function setItems (? array $ items = null );
42
42
}
Original file line number Diff line number Diff line change @@ -60,8 +60,8 @@ public function __construct(
60
60
Context $ context ,
61
61
Registry $ registry ,
62
62
Data $ helperData ,
63
- AbstractResource $ resource = null ,
64
- AbstractDb $ resourceCollection = null ,
63
+ ? AbstractResource $ resource = null ,
64
+ ? AbstractDb $ resourceCollection = null ,
65
65
array $ data = []
66
66
) {
67
67
$ this ->helperData = $ helperData ;
Original file line number Diff line number Diff line change @@ -138,8 +138,8 @@ public function __construct(
138
138
CategoryFactory $ categoryFactory ,
139
139
CollectionFactory $ postCollectionFactory ,
140
140
CategoryCollectionFactory $ categoryCollectionFactory ,
141
- AbstractResource $ resource = null ,
142
- AbstractDb $ resourceCollection = null ,
141
+ ? AbstractResource $ resource = null ,
142
+ ? AbstractDb $ resourceCollection = null ,
143
143
array $ data = []
144
144
) {
145
145
$ this ->categoryFactory = $ categoryFactory ;
Original file line number Diff line number Diff line change @@ -89,8 +89,8 @@ public function __construct(
89
89
Registry $ registry ,
90
90
CollectionFactory $ postCollectionFactory ,
91
91
CommentCollectionFactory $ commentCollectionFactory ,
92
- AbstractResource $ resource = null ,
93
- AbstractDb $ resourceCollection = null ,
92
+ ? AbstractResource $ resource = null ,
93
+ ? AbstractDb $ resourceCollection = null ,
94
94
array $ data = []
95
95
) {
96
96
$ this ->postCollectionFactory = $ postCollectionFactory ;
Original file line number Diff line number Diff line change @@ -195,8 +195,8 @@ public function __construct(
195
195
HelperData $ helperData ,
196
196
StoreManagerInterface $ storeManager ,
197
197
HelperImage $ helperImage ,
198
- AbstractResource $ resource = null ,
199
- AbstractDb $ resourceCollection = null ,
198
+ ? AbstractResource $ resource = null ,
199
+ ? AbstractDb $ resourceCollection = null ,
200
200
array $ data = []
201
201
) {
202
202
$ this ->date = $ date ;
Original file line number Diff line number Diff line change @@ -243,8 +243,8 @@ public function __construct(
243
243
CategoryCollectionFactory $ categoryCollectionFactory ,
244
244
PostCollectionFactory $ postCollectionFactory ,
245
245
ProductCollectionFactory $ productCollectionFactory ,
246
- AbstractResource $ resource = null ,
247
- AbstractDb $ resourceCollection = null ,
246
+ ? AbstractResource $ resource = null ,
247
+ ? AbstractDb $ resourceCollection = null ,
248
248
array $ data = []
249
249
) {
250
250
$ this ->tagCollectionFactory = $ tagCollectionFactory ;
Original file line number Diff line number Diff line change @@ -71,8 +71,8 @@ public function __construct(
71
71
LoggerInterface $ logger ,
72
72
FetchStrategyInterface $ fetchStrategy ,
73
73
ManagerInterface $ eventManager ,
74
- AdapterInterface $ connection = null ,
75
- AbstractDb $ resource = null
74
+ ? AdapterInterface $ connection = null ,
75
+ ? AbstractDb $ resource = null
76
76
) {
77
77
$ this ->localeDate = $ localeDate ;
78
78
$ this ->locale = $ localeResolver ->getLocale ();
Original file line number Diff line number Diff line change @@ -106,8 +106,8 @@ public function __construct(
106
106
Registry $ registry ,
107
107
CollectionFactory $ postCollectionFactory ,
108
108
TagCollectionFactory $ tagCollectionFactory ,
109
- AbstractResource $ resource = null ,
110
- AbstractDb $ resourceCollection = null ,
109
+ ? AbstractResource $ resource = null ,
110
+ ? AbstractDb $ resourceCollection = null ,
111
111
array $ data = []
112
112
) {
113
113
$ this ->postCollectionFactory = $ postCollectionFactory ;
Original file line number Diff line number Diff line change @@ -118,8 +118,8 @@ public function __construct(
118
118
Registry $ registry ,
119
119
CollectionFactory $ postCollectionFactory ,
120
120
TopicCollectionFactory $ topicCollectionFactory ,
121
- AbstractResource $ resource = null ,
122
- AbstractDb $ resourceCollection = null ,
121
+ ? AbstractResource $ resource = null ,
122
+ ? AbstractDb $ resourceCollection = null ,
123
123
array $ data = []
124
124
) {
125
125
$ this ->postCollectionFactory = $ postCollectionFactory ;
Original file line number Diff line number Diff line change 2
2
"name" : " mageplaza/magento-2-blog-extension" ,
3
3
"description" : " Magento 2 Blog extension" ,
4
4
"require" : {
5
- "mageplaza/module-core" : " ^1.5.10 " ,
6
- "mageplaza/facebook-graph-sdk" : " ^1.0.1 "
5
+ "mageplaza/module-core" : " ^1.5.13 " ,
6
+ "mageplaza/facebook-graph-sdk" : " ^1.0.2 "
7
7
},
8
8
"type" : " magento2-module" ,
9
- "version" : " 4.2.7 " ,
9
+ "version" : " 4.2.8 " ,
10
10
"license" : " proprietary" ,
11
11
"keywords" : [
12
12
" magento 2" ,
Original file line number Diff line number Diff line change 19
19
*/
20
20
21
21
define ( [
22
- 'jquery' ,
23
- 'prototype' ,
24
- 'extjs/ext-tree-checkbox'
22
+ 'jquery'
25
23
] , function ( jQuery ) {
26
24
27
- var categorySubmit = function ( url , useAjax ) {
25
+ var categorySubmit = function ( ) {
28
26
var activeTab = $ ( 'active_tab_id' ) ;
29
27
if ( activeTab ) {
30
28
if ( activeTab . tabsJsObject && activeTab . tabsJsObject . tabs ( 'activeAnchor' ) ) {
31
29
activeTab . value = activeTab . tabsJsObject . tabs ( 'activeAnchor' ) . prop ( 'id' ) ;
32
30
}
33
31
}
34
32
35
- var params = { } ;
36
- var fields = $ ( 'category_edit_form' ) . getElementsBySelector ( 'input' , 'select' ) ;
37
- for ( var i = 0 ; i < fields . length ; i ++ ) {
38
- if ( ! fields [ i ] . name ) {
39
- continue ;
40
- }
41
- params [ fields [ i ] . name ] = fields [ i ] . getValue ( ) ;
42
- }
43
-
44
- // Get info about what we're submitting - to properly update tree nodes
45
- var categoryId = params [ 'category[id]' ] ? params [ 'category[id]' ] : 0 ;
46
- var isCreating = categoryId == 0 ; // Separate variable is needed because '0' in javascript converts to TRUE
47
- var path = params [ 'category[path]' ] . split ( '/' ) ;
48
- var parentId = path . pop ( ) ;
49
- if ( parentId == categoryId ) { // Maybe path includes Blog Category id itself
50
- parentId = path . pop ( ) ;
51
- }
52
-
53
- // Make operations with Blog Category tree
54
- if ( isCreating ) {
55
- if ( ! Ext . tree . currentNodeId ) {
56
- // First submit of form - select some node to be current
57
- Ext . tree . currentNodeId = parentId ;
58
- }
59
- Ext . tree . addNodeTo = parentId ;
60
- }
61
-
62
33
// Submit form
63
34
jQuery ( '#category_edit_form' ) . trigger ( 'submit' ) ;
64
35
} ;
You can’t perform that action at this time.
0 commit comments