Пример #1
0
 public function behaviors()
 {
     return ['controller' => ['class' => AdminControllerBehavior::className(), 'module' => Module::className()], 'verbs' => ['class' => VerbFilter::className(), 'actions' => ['delete' => ['post'], 'confirm' => ['post'], 'block' => ['post']]], 'access' => ['class' => AccessControl::className(), 'rules' => [['actions' => ['index', 'select2-list', 'ajax-search'], 'allow' => true, 'roles' => ['users-admin-index']], ['actions' => ['update', 'update-profile', 'info'], 'allow' => true, 'roles' => ['users-admin-update']], ['actions' => ['assignments'], 'allow' => true, 'roles' => ['users-admin-assignments']], ['actions' => ['create'], 'allow' => true, 'roles' => ['users-admin-create']], ['actions' => ['view'], 'allow' => true, 'roles' => ['users-admin-view']], ['actions' => ['delete'], 'allow' => true, 'roles' => ['users-admin-delete']], ['actions' => ['block'], 'allow' => true, 'roles' => ['users-admin-block']]]]];
 }
Пример #2
0
 public function behaviors()
 {
     return ['CustomControllerBehavior' => ['class' => ControllerBehavior::className(), 'module' => Module::className()]];
 }