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