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