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