yii\rbac\ManagerInterface::remove PHP Method

remove() public method

Removes a role, permission or rule from the RBAC system.
public remove ( Role | Permission | Rule $object ) : boolean
$object Role | Permission | Rule
return boolean whether the role, permission or rule is successfully removed
    public function remove($object);

Usage Example

コード例 #1
0
ファイル: RouteModel.php プロジェクト: yii2mod/yii2-rbac
 /**
  * Remove items
  *
  * @param array $routes
  *
  * @return bool
  */
 public function remove($routes)
 {
     foreach ($routes as $route) {
         $item = $this->manager->createPermission('/' . trim($route, '/'));
         $this->manager->remove($item);
     }
     $this->invalidate();
     return true;
 }
All Usage Examples Of yii\rbac\ManagerInterface::remove