/** * Add tag * * @param AppBundle\Document\CompteTag $tag */ public function addTag(\AppBundle\Document\CompteTag $tag) { foreach ($this->getTags() as $t) { if ($t->getIdentifiant() == $tag->getIdentifiant()) { return; } } $this->tags[] = $tag; }
/** * Add tag * * @param AppBundle\Document\CompteTag $tag */ public function addTag(\AppBundle\Document\CompteTag $tag) { foreach ($this->getTags() as $t) { if ($t->getIdentifiant() == $tag->getIdentifiant()) { return; } } $this->tags[] = $tag; }