Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Compared.php
Go to the documentation of this file.
1 <?php
8 
16 {
20  const XML_PATH_RECENTLY_COMPARED_COUNT = 'catalog/recently_products/compared_count';
21 
28 
34  public function getPageSize()
35  {
36  if ($this->hasData('page_size')) {
37  return $this->getData('page_size');
38  }
39  return $this->_scopeConfig->getValue(
40  self::XML_PATH_RECENTLY_COMPARED_COUNT,
41  \Magento\Store\Model\ScopeInterface::SCOPE_STORE
42  );
43  }
44 
51  protected function _toHtml()
52  {
53  if (!$this->getCount()) {
54  return '';
55  }
56 
57  $this->setRecentlyComparedProducts($this->getItemsCollection());
58 
59  return parent::_toHtml();
60  }
61 }
getData($key='', $index=null)
Definition: DataObject.php:119