File tree 1 file changed +32
-1
lines changed
app/code/Magento/Theme/Block/Html
1 file changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,13 @@ class Pager extends \Magento\Framework\View\Element\Template
95
95
*/
96
96
protected $ _frameEnd ;
97
97
98
+ /**
99
+ * Url Fragment for pagination
100
+ *
101
+ * @var string|null
102
+ */
103
+ protected $ _fragment = null ;
104
+
98
105
/**
99
106
* Set pager data
100
107
*
@@ -246,11 +253,12 @@ public function getLimitVarName()
246
253
* Set pager limit
247
254
*
248
255
* @param array $limits
249
- * @return void
256
+ * @return $this
250
257
*/
251
258
public function setAvailableLimit (array $ limits )
252
259
{
253
260
$ this ->_availableLimit = $ limits ;
261
+ return $ this ;
254
262
}
255
263
256
264
/**
@@ -435,6 +443,7 @@ public function getPagerUrl($params = [])
435
443
$ urlParams ['_current ' ] = true ;
436
444
$ urlParams ['_escape ' ] = true ;
437
445
$ urlParams ['_use_rewrite ' ] = true ;
446
+ $ urlParams ['_fragment ' ] = $ this ->getFragment ();
438
447
$ urlParams ['_query ' ] = $ params ;
439
448
440
449
return $ this ->getUrl ('*/*/* ' , $ urlParams );
@@ -740,4 +749,26 @@ protected function _toHtml()
740
749
}
741
750
return '' ;
742
751
}
752
+
753
+ /**
754
+ * get the url fragment
755
+ *
756
+ * @return string|null
757
+ */
758
+ public function getFragment ()
759
+ {
760
+ return $ this ->_fragment ;
761
+ }
762
+
763
+ /**
764
+ * set the url fragment
765
+ * @param $fragment
766
+ *
767
+ * @return $this
768
+ */
769
+ public function setFragment ($ fragment )
770
+ {
771
+ $ this ->_fragment = $ fragment ;
772
+ return $ this ;
773
+ }
743
774
}
You can’t perform that action at this time.
0 commit comments