| @@ 36-56 (lines=21) @@ | ||
| 33 | /** |
|
| 34 | * @inheritdoc |
|
| 35 | */ |
|
| 36 | public function behaviors() |
|
| 37 | { |
|
| 38 | return [ |
|
| 39 | 'access' => [ |
|
| 40 | 'class' => AccessControl::className(), |
|
| 41 | 'rules' => [ |
|
| 42 | [ |
|
| 43 | 'actions' => ['index', 'create', 'update', 'view', 'delete', 'bulk-action'], |
|
| 44 | 'allow' => true, |
|
| 45 | 'roles' => ['administrator'], |
|
| 46 | ], |
|
| 47 | ], |
|
| 48 | ], |
|
| 49 | 'verbs' => [ |
|
| 50 | 'class' => VerbFilter::className(), |
|
| 51 | 'actions' => [ |
|
| 52 | 'delete' => ['POST'], |
|
| 53 | ], |
|
| 54 | ], |
|
| 55 | ]; |
|
| 56 | } |
|
| 57 | ||
| 58 | /** |
|
| 59 | * Lists all Module models. |
|
| @@ 31-52 (lines=22) @@ | ||
| 28 | /** |
|
| 29 | * @inheritdoc |
|
| 30 | */ |
|
| 31 | public function behaviors() |
|
| 32 | { |
|
| 33 | return [ |
|
| 34 | 'access' => [ |
|
| 35 | 'class' => AccessControl::className(), |
|
| 36 | 'rules' => [ |
|
| 37 | [ |
|
| 38 | 'actions' => ['index', 'update', 'delete', 'bulk-action', 'reply'], |
|
| 39 | 'allow' => true, |
|
| 40 | 'roles' => ['editor'], |
|
| 41 | ], |
|
| 42 | ], |
|
| 43 | ], |
|
| 44 | 'verbs' => [ |
|
| 45 | 'class' => VerbFilter::className(), |
|
| 46 | 'actions' => [ |
|
| 47 | 'delete' => ['post'], |
|
| 48 | 'bulk-action' => ['post'], |
|
| 49 | ], |
|
| 50 | ], |
|
| 51 | ]; |
|
| 52 | } |
|
| 53 | ||
| 54 | ||
| 55 | /** |
|
| @@ 33-54 (lines=22) @@ | ||
| 30 | /** |
|
| 31 | * @inheritdoc |
|
| 32 | */ |
|
| 33 | public function behaviors() |
|
| 34 | { |
|
| 35 | return [ |
|
| 36 | 'access' => [ |
|
| 37 | 'class' => AccessControl::className(), |
|
| 38 | 'rules' => [ |
|
| 39 | [ |
|
| 40 | 'actions' => ['index', 'view', 'create', 'update', 'delete', 'bulk-action'], |
|
| 41 | 'allow' => true, |
|
| 42 | 'roles' => ['administrator'], |
|
| 43 | ], |
|
| 44 | ], |
|
| 45 | ], |
|
| 46 | 'verbs' => [ |
|
| 47 | 'class' => VerbFilter::className(), |
|
| 48 | 'actions' => [ |
|
| 49 | 'delete' => ['post'], |
|
| 50 | 'bulk-action' => ['post'], |
|
| 51 | ], |
|
| 52 | ], |
|
| 53 | ]; |
|
| 54 | } |
|
| 55 | ||
| 56 | /** |
|
| 57 | * Lists all PostType models. |
|
| @@ 29-56 (lines=28) @@ | ||
| 26 | /** |
|
| 27 | * @inheritdoc |
|
| 28 | */ |
|
| 29 | public function behaviors() |
|
| 30 | { |
|
| 31 | return [ |
|
| 32 | 'access' => [ |
|
| 33 | 'class' => AccessControl::className(), |
|
| 34 | 'rules' => [ |
|
| 35 | [ |
|
| 36 | 'actions' => [ |
|
| 37 | 'ajax-change-hierarchical', |
|
| 38 | 'ajax-create-non-hierarchical', |
|
| 39 | 'ajax-delete-non-hierarchical', |
|
| 40 | ], |
|
| 41 | 'allow' => true, |
|
| 42 | 'roles' => ['subscriber'], |
|
| 43 | ], |
|
| 44 | ], |
|
| 45 | ], |
|
| 46 | 'verbs' => [ |
|
| 47 | 'class' => VerbFilter::className(), |
|
| 48 | 'actions' => [ |
|
| 49 | 'ajax-change-hierarchical' => ['post'], |
|
| 50 | 'ajax-create-non-hierarchical' => ['post'], |
|
| 51 | 'ajax-delete-non-hierarchical' => ['post'], |
|
| 52 | ], |
|
| 53 | ], |
|
| 54 | ||
| 55 | ]; |
|
| 56 | } |
|
| 57 | ||
| 58 | /** |
|
| 59 | * If user change the value of checkbox when updating a post, this action will be triggered. |
|
| @@ 33-54 (lines=22) @@ | ||
| 30 | /** |
|
| 31 | * @inheritdoc |
|
| 32 | */ |
|
| 33 | public function behaviors() |
|
| 34 | { |
|
| 35 | return [ |
|
| 36 | 'access' => [ |
|
| 37 | 'class' => AccessControl::className(), |
|
| 38 | 'rules' => [ |
|
| 39 | [ |
|
| 40 | 'actions' => ['index', 'get-json', 'get-paging', 'editor-insert', 'field-insert'], |
|
| 41 | 'allow' => true, |
|
| 42 | 'roles' => ['author'], |
|
| 43 | ], |
|
| 44 | ], |
|
| 45 | ], |
|
| 46 | 'verbs' => [ |
|
| 47 | 'class' => VerbFilter::className(), |
|
| 48 | 'actions' => [ |
|
| 49 | 'editor-insert' => ['post'], |
|
| 50 | 'field-insert' => ['post'], |
|
| 51 | ], |
|
| 52 | ], |
|
| 53 | ]; |
|
| 54 | } |
|
| 55 | ||
| 56 | /** |
|
| 57 | * Displays files browser for editor and field. |
|
| @@ 52-73 (lines=22) @@ | ||
| 49 | /** |
|
| 50 | * @inheritdoc |
|
| 51 | */ |
|
| 52 | public function behaviors() |
|
| 53 | { |
|
| 54 | return [ |
|
| 55 | 'access' => [ |
|
| 56 | 'class' => AccessControl::className(), |
|
| 57 | 'rules' => [ |
|
| 58 | [ |
|
| 59 | 'actions' => ['index', 'upload', 'detail', 'install', 'delete', 'ajax-detail'], |
|
| 60 | 'allow' => true, |
|
| 61 | 'roles' => ['administrator'], |
|
| 62 | ], |
|
| 63 | ], |
|
| 64 | ], |
|
| 65 | 'verbs' => [ |
|
| 66 | 'class' => VerbFilter::className(), |
|
| 67 | 'actions' => [ |
|
| 68 | 'install' => ['post'], |
|
| 69 | 'delete' => ['post'], |
|
| 70 | ], |
|
| 71 | ], |
|
| 72 | ]; |
|
| 73 | } |
|
| 74 | ||
| 75 | /** |
|
| 76 | * Scan theme directory to get list of all available themes. |
|