File tree 4 files changed +11
-9
lines changed
4 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -261,7 +261,8 @@ public function getStyleViewModel()
261
261
/**
262
262
* @return string
263
263
*/
264
- public function getPageParamName (){
264
+ public function getPageParamName ()
265
+ {
265
266
return $ this ->config ->getPagePaginationType () !== 'p ' ? 'page ' : 'p ' ;
266
267
}
267
268
}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public function __construct(
30
30
Context $ context ,
31
31
array $ data = [],
32
32
Config $ config = null
33
- ){
33
+ ) {
34
34
parent ::__construct ($ context , $ data );
35
35
$ objectManager = \Magento \Framework \App \ObjectManager::getInstance ();
36
36
$ this ->config = $ config ?: $ objectManager ->create (Config::class);
@@ -169,7 +169,8 @@ public function getPagerHtml()
169
169
/**
170
170
* @return string
171
171
*/
172
- public function getPageParamName (){
172
+ public function getPageParamName ()
173
+ {
173
174
return $ this ->config ->getPagePaginationType () !== 'p ' ? 'page ' : 'p ' ;
174
175
}
175
176
}
Original file line number Diff line number Diff line change @@ -129,10 +129,10 @@ public function getPagerUrl($params = [])
129
129
$ urlParams ['_query ' ] = $ params ;
130
130
131
131
$ pageNumber = $ params ['page ' ] ?? ($ params ['p ' ] ?? null );
132
- if ($ this ->getPagePaginationType () !== '2 ' ){
132
+ if ($ this ->getPagePaginationType () !== '2 ' ) {
133
133
$ urlParams ['_query ' ] = [$ this ->getPagePaginationType () => $ pageNumber ];
134
134
$ url = $ this ->getUrl ($ this ->getPath (), $ urlParams );
135
- }else {
135
+ } else {
136
136
unset($ urlParams ['_current ' ]);
137
137
unset($ urlParams ['_query ' ]);
138
138
unset($ urlParams ['_fragment ' ]);
@@ -143,11 +143,11 @@ public function getPagerUrl($params = [])
143
143
$ page = '/page/ ' . $ params ['page ' ];
144
144
}
145
145
$ url = $ this ->getUrl ($ this ->getPath (), $ urlParams );
146
- if ($ parsed = explode ('/ ' , parse_url ($ url )['path ' ])){
146
+ if ($ parsed = explode ('/ ' , parse_url ($ url )['path ' ])) {
147
147
$ key = array_search ('page ' , $ parsed );
148
- if ($ key && isset ($ parsed [$ key + 1 ]) && intval ($ parsed [$ key + 1 ])){
148
+ if ($ key && isset ($ parsed [$ key + 1 ]) && intval ($ parsed [$ key + 1 ])) {
149
149
$ url = str_replace ('/page/ ' . $ parsed [$ key + 1 ], $ page , $ url );
150
- }else {
150
+ } else {
151
151
$ url = $ url . $ page ;
152
152
}
153
153
}
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ class UrlResolver implements UrlResolverInterface
59
59
/**
60
60
* @var Config|mixed
61
61
*/
62
- protected $ config ;
62
+ protected $ config ;
63
63
64
64
/**
65
65
* UrlResolver constructor.
You can’t perform that action at this time.
0 commit comments