plugin/blog/Manager/BlogManager.php
protected function retrieveTag($name)
    {
        $tag = $this->objectManager->getRepository('IcapBlogBundle:Tag')->findOneByName($name);

        if (!$tag) {
            //let's look if it's scheduled for an Insert...
            $tag = $this->getTagFromIdentityMapOrScheduledForInsert($name);

            if (!$tag) {
                $tag = new Tag();
                $tag->setName($name);
                $this->objectManager->persist($tag);
            }
        }

        return $tag;
    }
protected function retrieveTag($name)
    {
        $tag = $this->objectManager->getRepository('IcapBlogBundle:Tag')->findOneByName($name);

        if (!$tag) {
            //let's look if it's scheduled for an Insert...
            $tag = $this->getTagFromIdentityMapOrScheduledForInsert($name);

            if (!$tag) {
                $tag = new Tag();
                $tag->setName($name);
                $this->objectManager->persist($tag);
            }
        }

        return $tag;
    }
protected function retrieveTag ( $ name ) { $ tag = $ this -> objectManager -> getRepository ( 'IcapBlogBundle:Tag' ) -> findOneByName ( $ name ) ; if ( ! $ tag ) { //let's look if it's scheduled for an Insert... $ tag = $ this -> getTagFromIdentityMapOrScheduledForInsert ( $ name ) ; if ( ! $ tag ) { $ tag = new Tag ( ) ; $ tag -> setName ( $ name ) ; $ this -> objectManager -> persist ( $ tag ) ; } } return $ tag ; }
This method is used by the workspace import function.

@param string $name

@return Tag
This method is used by the workspace import function .