yii\rbac\ManagerInterface::removeChildren PHP Метод

removeChildren() публичный Метод

Note, the children items are not deleted. Only the parent-child relationships are removed.
public removeChildren ( Item $parent ) : boolean
$parent Item
Результат boolean whether the removal is successful
    public function removeChildren($parent);

Usage Example

Пример #1
0
 /**
  * @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