yii\rbac\ManagerInterface::getPermission PHP 메소드

getPermission() 공개 메소드

Returns the named permission.
public getPermission ( string $name ) : null | Permission
$name string the permission name.
리턴 null | Permission the permission corresponding to the specified name. Null is returned if no such permission.
    public function getPermission($name);

Usage Example

예제 #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::getPermission