@param $keywords

@return $this

@throws NewsItemException
16200
public function setKeywords($keywords)
    {
        self::writeFullTag(
            $keywords,
            'keywords',
            false,
            'news:keywords',
            $this->validator,
            'validateKeywords',
            $this->exception,
            'Provided keyword list is not a valid value.'
        );

        return $this;
    }
907874
protected function _prepareMetaKeyword($keywords, $removeDuplicatedWords = true)
    {

        $string = $this->_prepareMetaDescription($keywords, -1, false);

        if ($removeDuplicatedWords) {
            $string = $this->_removeDuplicatedWords($string, \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aSkipTags'));
        }

        return trim($string);
    }
236751
protected function getSearchQuery($keywords)
    {
        $query = parent::getSearchQuery($keywords);

        // add hook to modify search query
        $this->extend('updateSearchQuery', $query);

        return $query;
    }
1299627
public function setMetatags(array $metatags)
    {
        if(array_key_exists('title', $metatags)) $this->metaTitle = $metatags['title'];
        if(array_key_exists('description', $metatags)) $this->metaDescription = $metatags['description'];
        if(array_key_exists('keywords', $metatags)) $this->metaKeywords = $metatags['keywords'];

        return $this;
    }
895336
public function addKeywords($keywords) {
		if (is_string($keywords)) {
			$keywords = explode(',', $keywords);
		}
		
		foreach ($keywords as $keyword) {
			$this->addKeyword($keyword);
		}
		
		return $this;
	}
708392
public function keywords($keywords = [])
    {
        $args = func_get_args();

        $this->mergeKeywords = (is_bool(end($args)) || is_int(end($args))) ? array_pop($args) : false;

        $keywords = is_array($keywords) ? $keywords : $args;

        array_walk($keywords, function (&$value) {
            $value = is_object($value) ? get_class($value) : $value;
        });

        $this->keywords = array_unique($keywords);

        return $this;
    }
797695
public function setItems($items)
    {
        foreach ($items as $item) {
            $item->setGallery($this);
        }
        $this->items = $items;

        return $this;
    }
1079548
public function indexing($keyword)
    {
        if ($this->indexing == null) {
            $tableCreated = false;
            if (!\file_exists($this->SqliteDir . '/indexing')) {
                $tableCreated = true;
            }

            $PDO = new PDO("sqlite:" . $this->SqliteDir . '/' . self::INDEXING_FILE);
            $PDO->setAttribute(PDO::ATTR_ERRMODE,
                PDO::ERRMODE_EXCEPTION);

            if ($tableCreated) {
                $this->initIndexing($PDO);
            }
            $this->indexing = $PDO;
            unset($PDO);

            $stm = $this->indexing->prepare("SELECT MAX(`db`) as `db` FROM `balancing`");
            $stm->execute();
            $row = $stm->fetch(PDO::FETCH_ASSOC);
            if (!isset($row['db'])) {
                $db = 1;
            } elseif ($row['db'] <= 1) {
                $db = 1;
            } else {
                $db = $row['db'];
            }

            // check file size

            $size = \file_exists($this->SqliteDir . '/db' . $db) ? filesize($this->SqliteDir . '/db' . $db) : 1;
            $size = round($size / 1024 / 1024, 1);


            if ($size > $this->maxSize) {
                $db++;
            }
            $this->currentDB = $db;

        }

        // look for keyword
        $stm = $this->indexing->prepare("SELECT * FROM `balancing` WHERE `keyword`=:keyword LIMIT 1");
        $stm->execute([
            ':keyword' => $keyword,
        ]);
        $row = $stm->fetch(PDO::FETCH_ASSOC);
        if (isset($row['db']) && $row['db'] != '') {
            $db = $row['db'];
        } else {
            /*
             * Insert new to Indexing
             */
            $db = $this->currentDB;
            $stm = $this->indexing->prepare("INSERT INTO `balancing` (`keyword`,`db`) VALUES(:keyword, :db)");
            $stm->execute([
                ':keyword' => $keyword,
                ':db' => $db,
            ]);
        }

        return $db;
    }
820909
public function withKeywords(array $keywords)
    {
        Assertion::allString($keywords);
        Assertion::allNotBlank($keywords);

        $instance = clone $this;

        $instance->keywords = $keywords;

        return $instance;
    }
1004924
private function prepareKeywords($keywords)
    {
        if ($keywords === null)
            return null;

        if (is_array($keywords))
            $keywords = implode(', ', $keywords);

        return strtolower(strip_tags($keywords));
    }
711405
public function parseKeywordToText($keywords, $alias = null)
    {
        foreach($keywords as $k => $v)
        {
            if(Text::isEmpty($v))
            {
                unset($keywords[$k]);
            }
        }
        $isLastStar = '*' === end($keywords);
        $result = BaseBuilder::DELIMITED_IDENTIFIERS . implode(BaseBuilder::DELIMITED_IDENTIFIERS . '.' . BaseBuilder::DELIMITED_IDENTIFIERS, $keywords) . BaseBuilder::DELIMITED_IDENTIFIERS;
        if($isLastStar)
        {
            $result = str_replace(BaseBuilder::DELIMITED_IDENTIFIERS . '*' . BaseBuilder::DELIMITED_IDENTIFIERS, '*', $result);
        }
        if(!Text::isEmpty($alias))
        {
            $result .= ' as ' . BaseBuilder::DELIMITED_IDENTIFIERS . $alias . BaseBuilder::DELIMITED_IDENTIFIERS;
        }
        return $result;
    }
423365
public function getOptions($keywords = null)
    {
        if (!isset($this->attributeKey)) {
            return [];
        }

        if (!is_object($this->attributeKey->getAttributeKeySettings())) {
            return [];
        }

        if (!isset($this->akSelectOptionDisplayOrder)) {
            $this->load();
        }

        $type = $this->attributeKey->getAttributeKeySettings();

        $em = \Database::get()->getEntityManager();
        $r = $em->getRepository('\Concrete\Core\Entity\Attribute\Value\Value\SelectValueOption');
        $builder = $r->createQueryBuilder('v');
        $builder->where('v.list = :list');
        $builder->andWhere('v.isDeleted = false');
        if ($keywords) {
            $builder->andWhere($builder->expr()->like('v.value', ':value'));
            $builder->setParameter('value', $keywords . '%');
        }
        $builder->setParameter('list', $type->getOptionList());
        $options = [];
        switch ($this->akSelectOptionDisplayOrder) {
            case 'popularity_desc':
                $builder->addSelect('count(va.generic_value) as total');
                $builder->leftJoin('v.values', 'va');
                $builder->groupBy('v.avSelectOptionID');
                $builder->orderBy('total', 'desc');
                $r = $builder->getQuery()->getResult();
                foreach ($r as $option) {
                    $options[] = $option[0];
                }
                break;
            case 'alpha_asc':
                $builder->orderBy('v.value', 'asc');
                $options = $builder->getQuery()->getResult();
                break;
            default:
                $builder->orderBy('v.displayOrder', 'asc');
                $options = $builder->getQuery()->getResult();
                break;
        }

        return $options;
    }
316623
protected function storeKeywords($key, $minutes = null, array $keywords = [])
    {
        $keywords = empty($keywords) ? $this->keywords : $keywords;

        $this->determineKeywordsState($key, $keywords);

        $this->updateKeywordIndex($key);

        $this->updateInverseIndex($key, $minutes);
    }
168017
public function setHeadword($headword, $addSynonyms = false)
    {
        if (is_string($headword)) {
            return Headword::add($headword, $this, $addSynonyms);
        }
        if ($headword instanceof Headword) {
            return Headword::add($headword->word, $this, $addSynonyms);
        }
    }
954220
public function filterByKeywords($keywords)
    {
        $expressions = [
            $this->query->expr()->like('u.uName', ':keywords'),
            $this->query->expr()->like('u.uEmail', ':keywords'),
        ];

        $keys = \Concrete\Core\Attribute\Key\UserKey::getSearchableIndexedList();
        foreach ($keys as $ak) {
            $cnt = $ak->getController();
            $expressions[] = $cnt->searchKeywords($keywords, $this->query);
        }
        $expr = $this->query->expr();
        $this->query->andWhere(call_user_func_array([$expr, 'orX'], $expressions));
        $this->query->setParameter('keywords', '%' . $keywords . '%');
    }
333392
public void setKeyword(java.util.Collection<KeywordFilter> keyword) {
        if (keyword == null) {
            this.keyword = null;
            return;
        }

        this.keyword = new java.util.ArrayList<KeywordFilter>(keyword);
    }
886939
protected function getKeywordAsArray($keywords) {
        $keywordWithoutOperator = preg_replace(explode('|', KeywordableTraitInterface::OPERATOR_SPLIT), ' ', $keywords);
        $keywordArray = explode(' ', $keywordWithoutOperator);

        return $keywordArray;
    }