Get the value tags.

@return CollectionInterface
187095
protected function getValueTags(): CollectionInterface
    {
        return $this->tagsManager->findMultiple(['values' => \is_array($this->varValue) ? $this->varValue : []]);
    }
1346961
public static function get_tag_collections() {
        global $CFG, $PAGE;

        if (empty($CFG->usetags)) {
            throw new moodle_exception('tagsaredisabled', 'tag');
        }

        $context = context_system::instance();
        self::validate_context($context);
        $PAGE->set_context($context); // Needed by internal APIs.
        $output = $PAGE->get_renderer('core');

        $collections = core_tag_collection::get_collections();
        $exportedcollections = array();
        foreach ($collections as $collection) {
            $exporter = new \core_tag\external\tag_collection_exporter($collection);
            $exportedcollections[] = $exporter->export($output);
        }

        return array(
            'collections' => $exportedcollections,
            'warnings' => array(),
        );
    }
537959
public function getValue()
    {
        $value = [];
        foreach ($this->getElements() as $el) {
            if ($el->getKey() !== null) {
                $value[$el->getKey()] = $el->getValue();
            } else {
                $value[] = $el->getValue();
            }
        }

        return $value;
    }
1090353
public function getTagTokens(): array
    {
        $iteratedPos = 0;
        $tagPositions = $this->getCommentStartToken()['comment_tags'];
        $tagTokens = [];

        /** @var int $tagPos */
        foreach ($tagPositions as $tagPos) {
            if ($tagPos >= $iteratedPos) {
                $tagTokens[$tagPos] = $this->tokens[$tagPos] + [
                    'contents' => $this->loadTagContentTokens($tagPos, $iteratedPos)
                ];
            }
        }

        return $tagTokens;
    }
296837
protected function getCollectionFromObjectByValue()
    {
        $object = $this->getObject();
        $getter = 'get' . ucfirst($this->getCollectionName());

        if (!method_exists($object, $getter)) {
            throw new InvalidArgumentException(
                sprintf(
                    'The getter %s to access collection %s in object %s does not exist',
                    $getter,
                    $this->getCollectionName(),
                    get_class($object)
                )
            );
        }

        return $object->$getter();
    }
881661
protected function parseTags()
    {
        $token = $this->expectTokenType('Tag');
        $this->tags = array_merge($this->tags, $token['tags']);

        return $this->parseExpression();
    }
1079761
public function getValue()
    {
        if (!empty($this->elements)) {
            $value = [];
            foreach ($this->elements as $el) {
                if ($el->getKey() !== null) {
                    $value[$el->getKey()] = $el->getValue();
                } else {
                    $value[] = $el->getValue();
                }
            }

            return $value;
        } else {
            return $this->value;
        }
    }
1209304
public function collections()
    {
        $uri = $this->uri->withPath($this->uri->getPath() . ':listCollectionIds');
        $value = $this->client->post($uri, null);
        $collections = [];

        foreach ($value['collectionIds'] as $id) {
            $collections[] = $this->collection($id);
        }

        return $collections;
    }
583271
private function getTags(): array
    {
        $tags = [];
        foreach ($this->referenceStorePool->getStores() as $alias => $referenceStore) {
            $tags = array_merge($tags, $this->getTagsFromStore($alias, $referenceStore));
        }

        return $tags;
    }
807579
public function getTags()
    {
        $tags = array();
        foreach ($this->getTokenParsers()->getParsers() as $parser) {
            if ($parser instanceof Twig_TokenParserInterface) {
                $tags[$parser->getTag()] = $parser;
            }
        }

        return $tags;
    }
334798
public function getTagValues($tagName)
    {
        if (!$this->isTaggedWith($tagName)) {
            throw new \RuntimeException('Tag "' . $tagName . '" does not exist.', 1169128255);
        }
        return $this->tags[$tagName];
    }
298667
public function getValues()
    {
        $contentType = $this->getContenttype();
        if (!isset($contentType['fields'])) {
            return [];
        }

        $allValues = $this->toArray();

        return array_intersect_key($allValues, ($contentType['fields']));
    }
137323
public function getSortedTags() {
		if ($this->comparator === null) {
			$this->comparator = new TagNameComparator(); 
		}

		// 1) group by tag name
		$group = new Map();
		foreach ($this->tags as $tag) {
			if (!$group->has($tag->getTagName())) {
				$group->set($tag->getTagName(), new ArrayList());
			}
			
			$group->get($tag->getTagName())->add($tag);
		} 
		
		// 2) Sort the group by tag name
		$group->sortKeys(new TagNameComparator());
		
		// 3) flatten the group
		$sorted = new ArrayList();
		foreach ($group->values() as $tags) {
			$sorted->addAll($tags);
		}
		
		return $sorted;
	}
1016811
private function getTagTokens(): array
    {
        if ($this->loadedTagTokens === null) {
            $this->loadedTagTokens = $this->loadTagTokens();
        }

        return $this->loadedTagTokens;
    }
1092562
public function tags()
    {
        if (null === $this->tags) {
            $retval = $this->execute('ls-remote', array('--tags' => true, $this->getUrl()));

            if ('' === trim($retval)) {
                return $this->tags = array();
            }

            $list = explode("\n", rtrim($retval));

            $tags = array();
            foreach ($list as $line) {
                list ($hash, $ref) = explode("\t", $line);
                $tags[] = new Reference(str_replace('refs/tags/', '', $ref), Reference::TAG, $hash);
            }

            $this->tags = $tags;
        }

        return $this->tags;
    }
780747
public static function getInstantiatedTagObjects()
    {
        $context = self::getInstance();
        foreach ($context->tags as $key => $config) {
            $context->instantiatTag($key);
        }
        
        return $context->tags;
    }
801519
public function getTags()
    {
        $tags = [];
        $this->caller->execute(TagCommand::getInstance($this)->listTags());
        foreach ($this->caller->getOutputLines() as $tagString) {
            if ($tagString != '') {
                $tags[] = new Tag($this, trim($tagString));
            }
        }

        return $tags;
    }