Returns an array with basic tag data.

@param mixed $tagId

@throws \RuntimeException

@return array
352995
public function getBasicTagData($tagId)
    {
        try {
            return $this->innerGateway->getBasicTagData($tagId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
837008
public function callbackSaveRelation($tagId)
    {
        $find = TagRelation::find()->where(['tag_id' => $tagId, 'table_name' => TaggableTrait::cleanBaseTableName($this->tableName), 'pk_id' => $this->getItemId()])->one();

        if ($find) {
            TagRelation::deleteAll(['tag_id' => $tagId, 'table_name' => TaggableTrait::cleanBaseTableName($this->tableName), 'pk_id' => $this->getItemId()]);
            return 0;
        } else {
            $model = new TagRelation();
            $model->setAttributes([
                'tag_id' => $tagId,
                'table_name' => TaggableTrait::cleanBaseTableName($this->tableName),
                'pk_id' => $this->getItemId(),
            ]);
            $model->insert(false);
            return 1;
        }
    }
1224338
private function getServiceListByTag($tag)
    {
        $services = [];
        $serviceIds = [];
        $serviceDefinitions = $this->container->getDefinitions();

        foreach ($tag as $tagId) {
            $serviceIds = array_merge(
                $serviceIds,
                array_keys($this->container->findTaggedServiceIds($tagId))
            );
        }

        foreach ($serviceIds as $serviceId) {
            $serviceDefinition = $serviceDefinitions[$serviceId];
            if ($serviceDefinition) {
                $services[] = [$serviceId, $serviceDefinition->getClass()];
            }
        }

        usort($services, [$this, 'compareService']);
        return $services;
    }
444209
public function find($id) : ?array
    {
        $identifier = $this->getIdentifier();

        $identifierValues = is_array($id) ? $id : [$id];

        $criteria = array_combine($identifier, $identifierValues);

        if ($criteria === false) {
            throw new RuntimeException('array_combine failed. Make sure you passed a value for each identifier.');
        }

        return $this->findOneBy($criteria);
    }
885897
public function update(int $tagId, string $tagName)
    {
        $params = [
            'tagid' => $tagId,
            'tagname' => $tagName,
        ];

        return $this->httpPostJson('cgi-bin/tag/update', $params);
    }
1304457
public static function getTags()
    {
        $finder = new Tag\Finder\Finder();

        foreach (func_get_args() as $arg) {
            if (is_string($arg)) {
                $finder->addFilter(new Tag\Finder\Group($arg));
            } elseif ($arg instanceof PageInterface) {
                $finder->addFilter(new Tag\Finder\AppliedToPage($arg));
            } elseif ($arg instanceof TagInterface) {
                $finder->addFilter(new Tag\Finder\AppliedWith($arg));
            }
        }

        return $finder
            ->setOrderBy('group', 'asc')
            ->setOrderBy('name', 'asc')
            ->findAll();
    }
240353
public function getContentIdsByContentTypeId($contentTypeId)
    {
        try {
            return $this->innerGateway->getContentIdsByContentTypeId($contentTypeId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
66392
static public function fetchTag( $tagID, $language = false )
    {
        if ( $language )
        {
            if ( !is_array( $language ) )
                $language = array( $language );
            eZContentLanguage::setPrioritizedLanguages( $language );
        }

        $result = false;
        if ( is_numeric( $tagID ) )
        {
            $result = eZTagsObject::fetch( $tagID );
        }
        else if ( is_array( $tagID ) && !empty( $tagID ) )
        {
            $result = eZTagsObject::fetchList( array( 'id' => array( $tagID ) ) );
        }

        if ( $language )
            eZContentLanguage::clearPrioritizedLanguages();

        if ( $result instanceof eZTagsObject || ( is_array( $result ) && !empty( $result ) ) )
            return array( 'result' => $result );

        return array( 'result' => false );
    }
210734
public function create($tagName, $tagId = null)
    {
        $params = array(
                    'tagname' => $tagName,
                    'tagid'   => $tagId
                );

        return $this->http->jsonPost(self::API_CREATE, $params);
    }
239834
protected function getReportData(?string $tagContent = null): ?array
    {
        // Satisfy php md
        unset($tagContent);

        return [
            self::MESSAGE_TAG_MISSING_DATES,
            $this->stackPos,
            static::CODE_TAG_MISSING_DATES,
            [
                $this->getValidPattern()
            ]
        ];
    }
924257
private function convertToTagDoc(TagDoc $tag) : array
    {
        $tagArray = ['name' => $tag->getName()];

        $tagArray = $this->appendIfValueNotNull('description', $tag->getDescription(), $tagArray);

        return $tagArray;
    }
294844
public function get_slot_tags_for_slot_id($slotid) {
        if (!$this->hasloadedtags) {
            // Lazy load the tags just in case they are never required.
            $this->populate_slot_tags();
            $this->hasloadedtags = true;
        }

        return isset($this->slottags[$slotid]) ? $this->slottags[$slotid] : [];
    }
896716
public function getTagsByTagName( $tagName )
	{
		$list	= array();
		$nodes	= $this->document->getElementsByTagName( $tagName );
		foreach( $nodes as $node )
			$list[]	= $node;
		return $list;
	}
892497
public function update($tagId, $tagName)
    {
        $params = array(
                    'tagid'   => $tagId,
                    'tagname' => $tagName
                );

        return $this->http->jsonPost(self::API_UPDATE, $params);
    }
736316
public function getTags($tagName = null) {
		return $this->tags->filter(function ($tag) use ($tagName) {
			return $tagName === null || $tag->getTagName() == $tagName;
		});
	}
1146003
public function exportById($id): array
    {
        $tagGroup = Craft::$app->tags->getTagGroupById((int) $id);

        return $this->export($tagGroup);
    }
182890
public function getTagUserList($tagId)
    {
        $result = $this->httpGet(self::WECHAT_TAG_USER_LIST_GET_PREFIX, [
            'access_token' => $this->getAccessToken(),
            'tagid' => $tagId
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'ok' ? $result : $this->dump($result);
    }