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

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

Returns all permissions in the system.
public getPermissions ( ) : Permission[]
Результат Permission[] all permissions in the system. The array is indexed by the permission names.
    public function getPermissions();

Usage Example

Пример #1
0
 /**
  * Get available and assigned routes
  *
  * @return array
  */
 public function getRoutes()
 {
     $routes = $this->getAppRoutes();
     $exists = [];
     foreach (array_keys($this->manager->getPermissions()) as $name) {
         if ($name[0] !== '/') {
             continue;
         }
         $exists[] = $name;
         unset($routes[$name]);
     }
     return ['available' => array_keys($routes), 'assigned' => $exists];
 }
All Usage Examples Of yii\rbac\ManagerInterface::getPermissions