Document/Index/Factory/TagCollectionFactory.php
public function create($tagNames)
    {
        $collection = new Collection();

        foreach ($tagNames as $tagName) {
            $tagEntity = $this->tagManager->findByName($tagName);

            if (!$tagEntity) {
                return;
            }

            $tag = new TagViewObject();
            $tag->name = $tagName;
            $tag->id = $tagEntity->getId();

            $collection[] = $tag;
        }

        return $collection;
    }
public function create($tagNames)
    {
        $collection = new Collection();

        foreach ($tagNames as $tagName) {
            $tagEntity = $this->tagManager->findByName($tagName);

            if (!$tagEntity) {
                return;
            }

            $tag = new TagViewObject();
            $tag->name = $tagName;
            $tag->id = $tagEntity->getId();

            $collection[] = $tag;
        }

        return $collection;
    }
public function create ( $ tagNames ) { $ collection = new Collection ( ) ; foreach ( $ tagNames as $ tagName ) { $ tagEntity = $ this -> tagManager -> findByName ( $ tagName ) ; if ( ! $ tagEntity ) { return ; } $ tag = new TagViewObject ( ) ; $ tag -> name = $ tagName ; $ tag -> id = $ tagEntity -> getId ( ) ; $ collection [ ] = $ tag ; } return $ collection ; }
Create tag collection.

@param string[] $tagNames

@return Collection
Create tag collection .