/** * Add a group * * @param Group $group * * @return AbstractAssociation */ public function addGroup(Group $group) { if (!$this->groups->contains($group)) { $this->groups->add($group); } return $this; }
/** * @param Group $group */ public function removeGroup(Group $group) { if (!$this->groups->contains($group)) { return; } $this->groups->removeElement($group); $group->removeUser($this); }
public function hasGroup(Group $group) { return $this->groups->contains($group); }