/**
  * @return array
  */
 public function behaviors()
 {
     $behaviors = ArrayHelper::merge(parent::behaviors(), ['verbs' => ['class' => VerbFilter::className(), 'actions' => ['delete' => ['post'], 'delete-multi' => ['post']]], 'accessDelete' => ['class' => AdminAccessControl::className(), 'only' => ['delete'], 'rules' => [['allow' => true, 'matchCallback' => function ($rule, $action) {
         if (Validate::validate(new HasBehavior(BlameableBehavior::className()), $this->model)->isValid()) {
             //Если такая привилегия заведена, нужно ее проверять.
             if ($permission = \Yii::$app->authManager->getPermission(CmsManager::PERMISSION_ALLOW_MODEL_DELETE)) {
                 if (!\Yii::$app->user->can($permission->name, ['model' => $this->model])) {
                     return false;
                 }
             }
         }
         return true;
     }]]]]);
     return $behaviors;
 }
 public function behaviors()
 {
     return ArrayHelper::merge(parent::behaviors(), [self::BEHAVIOR_ACTION_MANAGER => [], 'verbs' => ['class' => VerbFilter::className(), 'actions' => ['session' => ['post']]]]);
 }
 /**
  * Проверка доступа к админке
  * @return array
  */
 public function behaviors()
 {
     return ArrayHelper::merge(parent::behaviors(), ['adminViewEditAccess' => ['class' => AdminAccessControl::className(), 'only' => ['view-file-edit'], 'rules' => [['allow' => true, 'roles' => [CmsManager::PERMISSION_EDIT_VIEW_FILES]]]]]);
 }