SHARE
TWEET

Untitled

a guest Aug 19th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function afterGetLimit()
  2. {
  3.     $limit = $this->getValue();
  4.  
  5.     //MagentoCatalogModelProductProductListToolbar
  6.  
  7.     if ($this->_toolbarModel->getLimit()) {
  8.         return $this->_toolbarModel->getLimit();
  9.         $this->setValue($this->_toolbarModel->getLimit());
  10.     }
  11.     else{
  12.         return $this->getValue();
  13.     }
  14. }
  15.  
  16. public function setValue($key){
  17.     //MagentoFrameworkSessionSessionManagerInterface
  18.     $this->_session->start();
  19.     $this->_session->setPerPageLimit($key);
  20. }
  21.  
  22. public function getValue(){
  23.     //MagentoFrameworkSessionSessionManagerInterface
  24.     $this->_session->start();
  25.     return $this->_session->getPerPageLimit();
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top