public function behaviors() { return ['controller' => ['class' => AdminControllerBehavior::className(), 'module' => Module::className()], 'access' => ['class' => AccessControl::className(), 'rules' => [['actions' => ['index', 'select2-list'], 'allow' => true, 'roles' => ['rbac-role-admin-index']], ['actions' => ['create'], 'allow' => true, 'roles' => ['rbac-role-admin-create']], ['actions' => ['update'], 'allow' => true, 'roles' => ['rbac-role-admin-update']], ['actions' => ['delete'], 'allow' => true, 'roles' => ['rbac-role-admin-delete']]]]]; }
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']]]]]; }
/** * Behaviors * */ public function behaviors() { return ArrayHelper::merge(parent::behaviors(), ['controller' => ['class' => AdminControllerBehavior::className()]]); }