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;
}