public function addRole($role) { !$role instanceof Role && ($role = new Role($role)); $role->addUser($this, false); $this->roles->add($role); return $this; }
public function setParent(Role $parent, $addChildToParent = true) { $addChildToParent && $parent->addChildren($this, false); $this->parent = $parent; }