Skip to content

Commit

Permalink
Merge pull request #92 from magento-mpi/public-pulls
Browse files Browse the repository at this point in the history
[Github] Merge public Github commits
  • Loading branch information
vpelipenko committed Feb 12, 2015
2 parents b7cc65a + 8d0d799 commit 412f811
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion app/code/Magento/Theme/Block/Html/Pager.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ class Pager extends \Magento\Framework\View\Element\Template
*/
protected $_frameEnd;

/**
* Url Fragment for pagination
*
* @var string|null
*/
protected $_fragment = null;

/**
* Set pager data
*
Expand Down Expand Up @@ -246,11 +253,12 @@ public function getLimitVarName()
* Set pager limit
*
* @param array $limits
* @return void
* @return $this
*/
public function setAvailableLimit(array $limits)
{
$this->_availableLimit = $limits;
return $this;
}

/**
Expand Down Expand Up @@ -435,6 +443,7 @@ public function getPagerUrl($params = [])
$urlParams['_current'] = true;
$urlParams['_escape'] = true;
$urlParams['_use_rewrite'] = true;
$urlParams['_fragment'] = $this->getFragment();
$urlParams['_query'] = $params;

return $this->getUrl('*/*/*', $urlParams);
Expand Down Expand Up @@ -740,4 +749,26 @@ protected function _toHtml()
}
return '';
}

/**
* Get the URL fragment
*
* @return string|null
*/
public function getFragment()
{
return $this->_fragment;
}

/**
* Set the URL fragment
*
* @param string|null $fragment
* @return $this
*/
public function setFragment($fragment)
{
$this->_fragment = $fragment;
return $this;
}
}

0 comments on commit 412f811

Please sign in to comment.