Smile\ElasticsuiteCatalog\Plugin\LayerPlugin::beforePrepareProductCollection PHP Method

beforePrepareProductCollection() public method

{@inheritDoc}
public beforePrepareProductCollection ( Magento\Catalog\Model\Layer $layer, Magento\Catalog\Model\ResourceModel\Collection\AbstractCollection $collection )
$layer Magento\Catalog\Model\Layer
$collection Magento\Catalog\Model\ResourceModel\Collection\AbstractCollection
    public function beforePrepareProductCollection(\Magento\Catalog\Model\Layer $layer, \Magento\Catalog\Model\ResourceModel\Collection\AbstractCollection $collection)
    {
        if ($this->_isEnabledShowOutOfStock() === false) {
            $collection->addIsInStockFilter();
        }
        $this->setSortParams($layer, $collection);
    }