Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function addChild(RoleInterface $role)
 {
     if (!$this->hasChild($role)) {
         $role->setParent($this);
         $this->children->add($role);
     }
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function addRole(RoleInterface $role)
 {
     if (!$this->hasRole($role)) {
         $this->roles->add($role);
     }
     return $this;
 }