getKeywordsOfTerm example


    public function getKeywordsOfTerm($term)
    {
        $id = md5('Shopware_Modules_Search_' . $term);

        if (($keywords = $this->cache->fetch($id)) !== false) {
            return $keywords;
        }

        $keywords = $this->keywordFinder->getKeywordsOfTerm($term);

        $this->cache->save(
            $id,
            $keywords,
            $this->config->get('cachesearch')
        );

        return $keywords;
    }
}
/** * Required table fields: * - product_id : id of the product, used as join * * @param string $term * * @return QueryBuilder|null */
    public function buildQuery($term)
    {
        $keywords = $this->keywordFinder->getKeywordsOfTerm($term);

        if (empty($keywords)) {
            return null;
        }

        $tables = $this->getSearchTables();

        if (empty($tables)) {
            return null;
        }

        
Home | Imprint | This part of the site doesn't use cookies.