public function addSearchContainersFilter($searchContainers)
    {
        if (!is_array($searchContainers)) {
            $searchContainers = [$searchContainers];
        }

        $cond = OptimizerInterface::TABLE_NAME_SEARCH_CONTAINER. '.'
            . OptimizerInterface::OPTIMIZER_ID
            .' =  main_table.'
            . OptimizerInterface::OPTIMIZER_ID;

        $this->join(OptimizerInterface::TABLE_NAME_SEARCH_CONTAINER, $cond);
        $this->addFilter(OptimizerInterface::SEARCH_CONTAINER, ['in' => $searchContainers]);

        return $this;
    }
public function addSearchContainersFilter($searchContainers)
    {
        if (!is_array($searchContainers)) {
            $searchContainers = [$searchContainers];
        }

        $cond = OptimizerInterface::TABLE_NAME_SEARCH_CONTAINER. '.'
            . OptimizerInterface::OPTIMIZER_ID
            .' =  main_table.'
            . OptimizerInterface::OPTIMIZER_ID;

        $this->join(OptimizerInterface::TABLE_NAME_SEARCH_CONTAINER, $cond);
        $this->addFilter(OptimizerInterface::SEARCH_CONTAINER, ['in' => $searchContainers]);

        return $this;
    }
public function addSearchContainersFilter ( $ searchContainers ) { if ( ! is_array ( $ searchContainers ) ) { $ searchContainers = [ $ searchContainers ] ; } $ cond = OptimizerInterface :: TABLE_NAME_SEARCH_CONTAINER . '.' . OptimizerInterface :: OPTIMIZER_ID . ' =  main_table.' . OptimizerInterface :: OPTIMIZER_ID ; $ this -> join ( OptimizerInterface :: TABLE_NAME_SEARCH_CONTAINER , $ cond ) ; $ this -> addFilter ( OptimizerInterface :: SEARCH_CONTAINER , [ 'in' => $ searchContainers ] ) ; return $ this ; }
Add search containers filer.

@param string $searchContainers Search containers.

@return \Smile\ElasticsuiteCatalogOptimizer\Model\ResourceModel\Optimizer\Collection
Add search containers filer .