![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/amasty/shopby/Block/Navigation/Top/ |
<?php /** * @author Amasty Team * @copyright Copyright (c) Amasty (https://www.amasty.com) * @package Improved Layered Navigation Base for Magento 2 */ namespace Amasty\Shopby\Block\Navigation\Top; use Amasty\Shopby\ViewModel\Navigation\Toolbar; use Magento\Catalog\Model\Layer\AvailabilityFlagInterface; use Magento\Catalog\Model\Layer\FilterList; use Magento\Catalog\Model\Layer\Resolver; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\View\Element\Template\Context; class Navigation extends \Magento\LayeredNavigation\Block\Navigation { public const NAME = 'amshopby.catalog.topnav'; /** * @var Toolbar */ private $toolbarModel; public function __construct( Context $context, Resolver $layerResolver, FilterList $filterList, AvailabilityFlagInterface $visibilityFlag, Toolbar $toolbarModel, array $data = [] ) { parent::__construct($context, $layerResolver, $filterList, $visibilityFlag, $data); $this->toolbarModel = $toolbarModel; } /** * @return \Magento\LayeredNavigation\Block\Navigation * @throws LocalizedException */ protected function _beforeToHtml() { $this->toolbarModel->resolveSearchLayoutToolbar($this->getLayout()); return parent::_beforeToHtml(); } }