protected function createTag(array $tagData)
    {
        $tagCreateStruct = $this->tagsService->newTagCreateStruct(
            $tagData['parent_id'],
            $tagData['main_language_code']
        );

        foreach ($tagData['keywords'] as $languageCode => $keyword) {
            $tagCreateStruct->setKeyword($keyword, $languageCode);
        }

        if (isset($tagData['remote_id'])) {
            $tagCreateStruct->remoteId = $tagData['remote_id'];
        }

        if (isset($tagData['always_available'])) {
            $tagCreateStruct->alwaysAvailable = $tagData['always_available'];
        }

        return $this->tagsService->createTag($tagCreateStruct);
    }
protected function createTag(array $tagData)
    {
        $tagCreateStruct = $this->tagsService->newTagCreateStruct(
            $tagData['parent_id'],
            $tagData['main_language_code']
        );

        foreach ($tagData['keywords'] as $languageCode => $keyword) {
            $tagCreateStruct->setKeyword($keyword, $languageCode);
        }

        if (isset($tagData['remote_id'])) {
            $tagCreateStruct->remoteId = $tagData['remote_id'];
        }

        if (isset($tagData['always_available'])) {
            $tagCreateStruct->alwaysAvailable = $tagData['always_available'];
        }

        return $this->tagsService->createTag($tagCreateStruct);
    }
protected function createTag ( array $ tagData ) { $ tagCreateStruct = $ this -> tagsService -> newTagCreateStruct ( $ tagData [ 'parent_id' ] , $ tagData [ 'main_language_code' ] ) ; foreach ( $ tagData [ 'keywords' ] as $ languageCode => $ keyword ) { $ tagCreateStruct -> setKeyword ( $ keyword , $ languageCode ) ; } if ( isset ( $ tagData [ 'remote_id' ] ) ) { $ tagCreateStruct -> remoteId = $ tagData [ 'remote_id' ] ; } if ( isset ( $ tagData [ 'always_available' ] ) ) { $ tagCreateStruct -> alwaysAvailable = $ tagData [ 'always_available' ] ; } return $ this -> tagsService -> createTag ( $ tagCreateStruct ) ; }
Creates a tag from provided data.

@param array $tagData

@return \Netgen\TagsBundle\API\Repository\Values\Tags\Tag
Creates a tag from provided data .