Set list of tags that should NOT be escaped
@param array $tags

@throws \RuntimeException
431961
public function setWhiteTagList(array $tags)
    {
        if (!$this->special_characters_allowed) {
            throw new RuntimeException('All special chars will be escaped. Set AllowHtml to use white list');
        }

        if ($this->black_tag_list) {
            throw new RuntimeException('Black list already added.');
        }

        $this->white_tag_list = $tags;
    }
1090257
public function filterByTags($tags)
    {
        $this->query->andWhere(
            $this->query->expr()->andX(
                $this->query->expr()->like('fv.fvTags', ':tags')
            )
        );
        $this->query->setParameter('tags', '%' . $tags . '%');
    }
756274
public function setTags($tags)
    {
        $this->tags = [];
        $this->ref = null;

        if (is_array($tags)) {
            foreach ($tags as $tag) {
                $this->addTag($tag);
            }
        } else {
            $this->addTag($tags);
        }

        return $this;
    }
123425
public void setTags(Map<String, String> tags) {
        if (tags == null) {
            this.tags = new HashMap<>();
        } else {
            this.tags = tags;
        }
    }
310248
public function runChecks($tags = [])
    {
        $errors = [];

        $checks = $this->getChecks();

        if (!empty($tags)) {
            $taggedChecks = [];
            foreach ($checks as $check) {
                // a check can have many tags
                // true if any of the tags provided appears in the check tags
                if (array_intersect($check['tags'], $tags)) {
                    $taggedChecks[] = $check;
                }
            }
            $checks = $taggedChecks;
        }

        foreach ($checks as $check) {
            $functionName = '';
            if (is_array($check['check'])) {
                if (count($check['check']) > 1) {
                    $obj = reset($check['check']);
                    $method = end($check['check']);
                    $functionName = get_class($obj).'::'.$method;
                } else {
                    $functionName = reset($check['check']);
                }
            }

            $errors = array_merge($errors, call_user_func($check['check']));

            assert(
                is_array($errors),
                sprintf(
                    'The function %s did not return a list. All functions registered ".
            "with the checks registry must return a list.',
                    $functionName
                )
            );
        }

        return $errors;
    }
999279
public function setTagsAttribute($tags): void
    {
        static::saved(function (self $model) use ($tags) {
            $model->syncTags($tags);
        });
    }
1023580
public function setTag(string $tag): void
    {
        if (!in_array($tag, static::ALLOWED_TAGS)) {
            throw new \InvalidArgumentException('Tag can be one of this type '.implode(' ', static::ALLOWED_TAGS));
        }

        $this->tag = $tag;
    }
1190445
public function removeTags(array $tags)
    {
        $this->tagsChanges['removed'] = array_unique(
            array_merge($this->tagsChanges['removed'], $tags)
        );

        return $this;
    }
329071
public void setTags(String... tags) {
        removeAllViews();
        for (final String tag : tags) {
            appendTag(tag);
        }

        if (isAppendMode) {
            appendInputTag();
        }
    }
771317
protected function sanitizeTags(array $tags)
    {
        foreach ($tags as $key => $value) {
            $tags[$key] = $this->sanitizeTag($value);
        }
        return $tags;
    }
398142
public function tags($tags): self
    {
        $tags = (array) $tags;

        $tags = array_merge($this->tags, $tags);

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

        return $this;
    }
1296971
public function banTags($tags)
    {
        try {
            $this->getVarnishPool()->ban('obj.http.' . self::HEADER_OBJECTS . ' ~ ' . implode('|', $tags));
        } catch (VarnishException $e) {
            Mage::logException($e);
        }

        return $this;
    }
661873
public void setTags(java.util.Collection<String> tags) {
        if (tags == null) {
            this.tags = null;
            return;
        }

        this.tags = new java.util.ArrayList<String>(tags);
    }
1373301
public function set_tags($tags) {
        $this->tags = [];
        foreach ($tags as $tag) {
            // We use $tag->id as the key for the array so not only it handles duplicates of the same tag being given,
            // but also it is consistent with the behaviour of set_tags_by_id() below.
            $this->tags[$tag->id] = $tag;
        }
    }
450023
protected function parseTags($tags)
    {
        $result = array();
        $tags = trim($tags);
        if ('' !== $tags) {
            if ('@' !== $tags[0]) {
                throw new \LogicException(
                    'A tag block started with text instead of an actual tag,'
                    . ' this makes the tag block invalid: ' . $tags
                );
            }
            foreach (explode("\n", $tags) as $tag_line) {
                if (isset($tag_line[0]) && ($tag_line[0] === '@')) {
                    $result[] = $tag_line;
                } else {
                    $result[count($result) - 1] .= "\n" . $tag_line;
                }
            }

            // create proper Tag objects
            foreach ($result as $key => $tag_line) {
                $result[$key] = Tag::createInstance(trim($tag_line), $this);
            }
        }

        $this->tags = $result;
    }
1318611
protected function setIgnoreTags()
    {
        if (!count($this->ignore_tags)) {
            $this->ignore_tags = array_keys($this->parser->tags->all());
        }
    }
971696
public function batchCreate(array $tags) {
        $requests = [];

        $required = ['title'];

        foreach ($tags as $data) {
            foreach ($required as $attribute) {
                if (!array_key_exists($attribute, $data)) {
                    throw new BadMethodCallException(sprintf(
                        'Missing attribute "%s"',
                        $attribute
                    ));
                }
            }

            $requests[] = [
                'method' => 'checkmk.statictag.create',
                'params' => [
                    'data' => $data
                ]
            ];
        }

        $result = $this->api->batchRequest($requests);

        $tagIDs = [];

        foreach ($result as $tag) {
            // Do not check 'id' because in a batch request it is always NULL:
            if (!array_key_exists('success', $tag) ||
                $tag['success'] !== true) {
                if (array_key_exists('message', $tag)) {
                    throw new RuntimeException(sprintf('Bad result: %s', $tag['message']));
                } else {
                    throw new RuntimeException('Bad result');
                }
            }

            $tagIDs[] = $tag['id'];
        }

        return $tagIDs;
    }