/** * @param Role $role * * @return $this */ public function removeAuthorizedRole(Role $role) { $this->authorizedRoles->removeElement($role); return $this; }
/** * Remove the Role object from collection * * @param Role|string $role * * @throws \InvalidArgumentException */ public function removeRole($role) { if ($role instanceof Role) { $roleObject = $role; } elseif (is_string($role)) { $roleObject = $this->getRole($role); } else { throw new \InvalidArgumentException('$role must be an instance of Oro\\Bundle\\UserBundle\\Entity\\Role or a string'); } if ($roleObject) { $this->roles->removeElement($roleObject); } }
/** * Replace the old platform roles of a user by a new array. * * @param $platformRoles */ public function setPlatformRoles($platformRoles) { $roles = $this->getEntityRoles(); $removedRoles = array(); foreach ($roles as $role) { if ($role->getType() != Role::WS_ROLE) { $removedRoles[] = $role; } } foreach ($removedRoles as $removedRole) { $this->roles->removeElement($removedRole); } foreach ($platformRoles as $platformRole) { $this->roles->add($platformRole); } }
/** * @param Role $role */ public function removeRole(Role $role) { $this->roles->removeElement($role); }
/** * Remove children * * @param \Bigfish\Bundle\UserBundle\Entity\Role $children */ public function removeChild(\Bigfish\Bundle\UserBundle\Entity\Role $children) { $this->children->removeElement($children); }
/** * {@inheritdoc} */ public function removeAuthorizationRole(RoleInterface $role) { if ($this->hasAuthorizationRole($role)) { $this->authorizationRoles->removeElement($role); } }
/** * Remove role * * @param \AppBundle\Entity\Role $role */ public function removeRole(\AppBundle\Entity\Role $role) { $this->roles->removeElement($role); }
public function removeChildren(Role $children) { $this->children->removeElement($children); }
/** * Remove child * * @param \Fp\UserBundle\Entity\Role $child */ public function removeChild(\Fp\UserBundle\Entity\Role $child) { $this->children->removeElement($child); }