File tree Expand file tree Collapse file tree 1 file changed +32
-1
lines changed
app/code/Magento/Theme/Block/Html Expand file tree Collapse file tree 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
9595 */
9696 protected $ _frameEnd ;
9797
98+ /**
99+ * Url Fragment for pagination
100+ *
101+ * @var string|null
102+ */
103+ protected $ _fragment = null ;
104+
98105 /**
99106 * Set pager data
100107 *
@@ -246,11 +253,12 @@ public function getLimitVarName()
246253 * Set pager limit
247254 *
248255 * @param array $limits
249- * @return void
256+ * @return $this
250257 */
251258 public function setAvailableLimit (array $ limits )
252259 {
253260 $ this ->_availableLimit = $ limits ;
261+ return $ this ;
254262 }
255263
256264 /**
@@ -435,6 +443,7 @@ public function getPagerUrl($params = [])
435443 $ urlParams ['_current ' ] = true ;
436444 $ urlParams ['_escape ' ] = true ;
437445 $ urlParams ['_use_rewrite ' ] = true ;
446+ $ urlParams ['_fragment ' ] = $ this ->getFragment ();
438447 $ urlParams ['_query ' ] = $ params ;
439448
440449 return $ this ->getUrl ('*/*/* ' , $ urlParams );
@@ -740,4 +749,26 @@ protected function _toHtml()
740749 }
741750 return '' ;
742751 }
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+ }
743774}
You can’t perform that action at this time.
0 commit comments