Exemple #1
0
 /**
  * {@inheritdoc}
  */
 public function addRole(RoleInterface $role)
 {
     if (!$this->hasRole($role)) {
         $this->roles->add($role);
     }
     return $this;
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function hasChild(RoleInterface $role)
 {
     return $this->children->contains($role);
 }