yii\rbac\ManagerInterface::removeChildren PHP Méthode

removeChildren() public méthode

Note, the children items are not deleted. Only the parent-child relationships are removed.
public removeChildren ( Item $parent ) : boolean
$parent Item
Résultat boolean whether the removal is successful
    public function removeChildren($parent);

Usage Example

 /**
  * @param ManagerInterface $auth
  * @param string $name
  * @param array $children
  */
 private function removePermission($auth, $name, $children = array())
 {
     $permission = $auth->getPermission($name);
     $auth->removeChildren($permission);
     if ($children) {
         foreach ($children as $childName => $childOptions) {
             $this->removePermission($auth, $childName, isset($childOptions['children']) ? $childOptions['children'] : array());
         }
     }
     $auth->remove($permission);
 }
All Usage Examples Of yii\rbac\ManagerInterface::removeChildren