Esempio n. 1
0
File: Role.php Progetto: j7mbo/aurex
 /**
  * @param User $user
  *
  * @return $this
  */
 public function addUser(User $user)
 {
     if (!$this->users->contains($user)) {
         $this->users->add($user);
     }
     return $this;
 }
Esempio n. 2
0
 /**
  * @param User $user
  */
 public function removeUser(User $user)
 {
     if (!$this->users->contains($user)) {
         return;
     }
     $this->users->removeElement($user);
     $user->removeGroup($this);
 }
Esempio n. 3
0
 /**
  * @param User $user
  *
  * @return $this
  */
 public function addUser(User $user)
 {
     // Check for duplication
     if (false === $this->users->contains($user)) {
         $this->users->add($user);
     }
     // Ensure the relation is bidirectional
     if (false === $user->getJobs()->contains($this)) {
         $user->addJob($this);
     }
     return $this;
 }
Esempio n. 4
0
 public function addUser(User $user)
 {
     if (!$this->users->contains($user)) {
         $this->users[] = $user;
     }
 }
Esempio n. 5
0
 /**
  * Remove publisherManager
  *
  * @param User $publisherManager
  * @return Publisher
  */
 public function removePublisherManager(User $publisherManager)
 {
     if ($this->publisherManagers->contains($publisherManager)) {
         $this->publisherManagers->removeElement($publisherManager);
     }
     return $this;
 }
Esempio n. 6
0
 public function removeAdministrator(User $user)
 {
     if ($this->administrators->contains($user)) {
         $this->administrators->removeElement($user);
         $user->removeAdministratedOrganization($this);
     }
 }