private function canApply()
    {
        $canApply = in_array($this->containerConfiguration->getName(), $this->optimizer->getSearchContainer());

        if ($canApply && $this->containerConfiguration->getName() == 'quick_search_container') {
            $config = $this->optimizer->getQuickSearchContainer();
            if ($config['apply_to'] == 1) {
                $queries = array_column($config['query_ids'], 'query_text');
                $canApply = in_array($this->queryText, $queries);
            }
        } elseif ($canApply && $this->containerConfiguration->getName() == 'catalog_view_container') {
            $config = $this->optimizer->getCatalogViewContainer();
            if ($config['apply_to'] == 1) {
                $categoryIds = array_filter($config['category_ids']);
                $canApply = in_array($this->category->getId(), $categoryIds);
            }
        }

        return $canApply;
    }
private function canApply()
    {
        $canApply = in_array($this->containerConfiguration->getName(), $this->optimizer->getSearchContainer());

        if ($canApply && $this->containerConfiguration->getName() == 'quick_search_container') {
            $config = $this->optimizer->getQuickSearchContainer();
            if ($config['apply_to'] == 1) {
                $queries = array_column($config['query_ids'], 'query_text');
                $canApply = in_array($this->queryText, $queries);
            }
        } elseif ($canApply && $this->containerConfiguration->getName() == 'catalog_view_container') {
            $config = $this->optimizer->getCatalogViewContainer();
            if ($config['apply_to'] == 1) {
                $categoryIds = array_filter($config['category_ids']);
                $canApply = in_array($this->category->getId(), $categoryIds);
            }
        }

        return $canApply;
    }
private function canApply ( ) { $ canApply = in_array ( $ this -> containerConfiguration -> getName ( ) , $ this -> optimizer -> getSearchContainer ( ) ) ; if ( $ canApply && $ this -> containerConfiguration -> getName ( ) == 'quick_search_container' ) { $ config = $ this -> optimizer -> getQuickSearchContainer ( ) ; if ( $ config [ 'apply_to' ] == 1 ) { $ queries = array_column ( $ config [ 'query_ids' ] , 'query_text' ) ; $ canApply = in_array ( $ this -> queryText , $ queries ) ; } } elseif ( $ canApply && $ this -> containerConfiguration -> getName ( ) == 'catalog_view_container' ) { $ config = $ this -> optimizer -> getCatalogViewContainer ( ) ; if ( $ config [ 'apply_to' ] == 1 ) { $ categoryIds = array_filter ( $ config [ 'category_ids' ] ) ; $ canApply = in_array ( $ this -> category -> getId ( ) , $ categoryIds ) ; } } return $ canApply ; }
Indicates if the current optmizer can be applied to the search context.

@return boolean
Indicates if the current optmizer can be applied to the search context .