public aroundGetResultCount ( Magento\CatalogSearch\Block\Result $resultBlock, Closure $proceed ) : integer | ||
$resultBlock | Magento\CatalogSearch\Block\Result | Result block. |
$proceed | Closure | Original method. |
return | integer |
public function aroundGetResultCount(Result $resultBlock, \Closure $proceed)
{
if ($this->resultCount === null) {
$size = $this->getProductCollection()->getSize();
$this->resultCount = $size;
}
return $this->resultCount;
}