Add keyword.

@param Keyword $keyword
177589
public function addKeyword(Keyword $keyword)
    {
        if (!$this->keywords->contains($keyword)) {
            $this->keywords->add($keyword);
        }
    }
406545
public function filterByKeywords($keywords)
    {
        $expressions = [
            $this->query->expr()->like('g.gName', ':keywords'),
            $this->query->expr()->like('g.gDescription', ':keywords'),
        ];

        $expr = $this->query->expr();
        $this->query->andWhere(call_user_func_array([$expr, 'orX'], $expressions));
        $this->query->setParameter('keywords', '%' . $keywords . '%');
    }
626839
public function setMetaKeywords($keywords)
    {
        if (is_array($keywords)) {
            $keywords = implode(', ', $keywords);
        }

        return $this->addMeta(['name' => 'keywords', 'content' => e($keywords)]);
    }
1151656
public function isKeyword($word)
    {
        if ($this->keywords === null) {
            $this->initializeKeywords();
        }

        return isset($this->keywords[strtoupper($word)]);
    }
874209
public void addKeywords(String[] keywords) {
        for (String keyword : keywords) {
            if (taxonomy.concepts.containsKey(keyword)) {
                throw new IllegalArgumentException(String.format("Concept %s already exists.", keyword));
            }
        }

        for (String keyword : keywords) {
            taxonomy.concepts.put(keyword, this);
        }

        if (synset == null) {
            synset = new TreeSet<>();
        }

        for (String keyword : keywords) {
            synset.add(keyword);
        }
    }
1084721
public function deserialize($data, Keyword $keyword)
    {
        $this->sipe('name', 'setName', $data, $keyword);

        if (isset($data['clacoForm']['id'])) {
            $clacoForm = $this->clacoFormRepo->findOneBy(['uuid' => $data['clacoForm']['id']]);

            if (!empty($clacoForm)) {
                $keyword->setClacoForm($clacoForm);
            }
        }

        return $keyword;
    }
1784
public function keywords($default = null)
  {
    if (!$k = $this->getKeywords()) {
      $d = $default ?: $this->getDefaultKeywords();
      $k = is_null($d) ? $this->getTitle() : $d;
    }

    return new Tag('meta', null, array('name' => 'keywords', 'content' => $k), true);
  }
1357605
public boolean addKeywords(String keywords) {
        try {
            return add(new Meta(Element.KEYWORDS, keywords));
		} catch (DocumentException de) {
            throw new ExceptionConverter(de);
        }
    }
1222048
private function AddKeywordsField()
    {
        $name = 'Keywords';
        $this->AddField(Input::Text($name, $this->page->GetKeywords()));
    }
237898
public function addKeyword($keyword, array $properties = null)
    {
        if ($properties === null) {
            $properties = [];
        }

        foreach ($properties as $propertyIdent) {
            $val = ('%'.$keyword.'%');
            $this->addFilter([
                'property' => $propertyIdent,
                'operator' => 'LIKE',
                'value'    => $val,
                'operand'  => 'OR'
            ]);
        }

        return $this;
    }
575279
private function computeIndentationSpaces($keyword)
    {
        if ($this->align === self::ALIGN_TO_RIGHT) {
            return (self::INDENTATION * 2) - strlen(trim($keyword)) + 1;
        }

        return self::INDENTATION;
    }
253241
def set_keywords(self, keywords):
        
        self._query_params += str(QueryParam.KEYWORDS) + '+'.join(keywords)
463624
public function setKeyword($keyword, $language = null)
    {
        if (empty($language)) {
            $language = $this->mainLanguageCode;
        }

        if (!is_array($this->keywords)) {
            $this->keywords = [];
        }

        $this->keywords[$language] = $keyword;
    }
1062579
public function setKeyword($keyword, $action)
    {
        if (!is_callable($action)) {
            throw new InvalidArgumentException("Please add a callable action for your keyword $keyword", 30);
        }

        if (!$this->hasValidCustomKeywordsOption()) {
            $this->setOption('keywords', []);
        }

        if ($action instanceof ExtensionContainerInterface) {
            $this->addExtension($action->getExtension());
        }

        $this->setOption(['keywords', $keyword], $action);
    }
982031
public function getKeyword($keyword, $lang = null)
    {
        $parts = $this->_callInternalLocale('getKeywords', null, $lang, false);
        return isset($parts[$keyword]) ? $parts[$keyword] : null;
    }
548535
function(keywords) {
         var node = this.createElementDefaultNS("KeywordList");

         for (var i=0, len=keywords.length; i<len; i++) {
             node.appendChild(this.createElementDefaultNS(
                 "Keyword", keywords[i]
             ));
         }
         return node;
     }
1055329
private static void addKeyword(String text, int type) {
        KEYWORDS.add(text);
        addTranslation(text, type);
    }