Example #1
0
 /**
  * Retrieve layer state object
  *
  * @return \Magento\Catalog\Model\Layer\State
  */
 public function getState()
 {
     $state = $this->getData('state');
     if (is_null($state)) {
         \Magento\Framework\Profiler::start(__METHOD__);
         $state = $this->_layerStateFactory->create();
         $this->setData('state', $state);
         \Magento\Framework\Profiler::stop(__METHOD__);
     }
     return $state;
 }