src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php
public function processTags($contact, $tags)
    {
        $get = function($tag) {
            return $tag->getId();
        };

        $delete = function($tag) use ($contact) {
            return $contact->removeTag($tag);
        };

        $update = function() {
            return true;
        };

        $add = function($tag) use ($contact) {
            return $this->addTag($contact, $tag);
        };

        $entities = $contact->getTags();

        $result = $this->processSubEntities(
            $entities,
            $tags,
            $get,
            $add,
            $update,
            $delete
        );

        $this->resetIndexOfSubentites($entities);

        return $result;
    }
public function processTags($contact, $tags)
    {
        $get = function($tag) {
            return $tag->getId();
        };

        $delete = function($tag) use ($contact) {
            return $contact->removeTag($tag);
        };

        $update = function() {
            return true;
        };

        $add = function($tag) use ($contact) {
            return $this->addTag($contact, $tag);
        };

        $entities = $contact->getTags();

        $result = $this->processSubEntities(
            $entities,
            $tags,
            $get,
            $add,
            $update,
            $delete
        );

        $this->resetIndexOfSubentites($entities);

        return $result;
    }
public function processTags ( $ contact , $ tags ) { $ get = function ( $ tag ) { return $ tag -> getId ( ) ; } ; $ delete = function ( $ tag ) use ( $ contact ) { return $ contact -> removeTag ( $ tag ) ; } ; $ update = function ( ) { return true ; } ; $ add = function ( $ tag ) use ( $ contact ) { return $ this -> addTag ( $ contact , $ tag ) ; } ; $ entities = $ contact -> getTags ( ) ; $ result = $ this -> processSubEntities ( $ entities , $ tags , $ get , $ add , $ update , $ delete ) ; $ this -> resetIndexOfSubentites ( $ entities ) ; return $ result ; }
Process all tags of request.

@param $contact The contact on which is worked
@param array $tags

@return bool True if the processing was successful, otherwise false
Process all tags of request .