yii\rbac\ManagerInterface::removeChild PHP Method

removeChild() public method

Note, the child item is not deleted. Only the parent-child relationship is removed.
public removeChild ( Item $parent, Item $child ) : boolean
$parent Item
$child Item
return boolean whether the removal is successful
    public function removeChild($parent, $child);

Usage Example

Beispiel #1
0
 public function actionAjaxChildRemove($name)
 {
     $role = $this->findRole($name);
     $namePermission = Yii::$app->request->post('permission');
     $permission = $this->auth->getPermission($namePermission);
     return $this->auth->removeChild($role, $permission) ? 'success' : 'fail';
 }
All Usage Examples Of yii\rbac\ManagerInterface::removeChild