예제 #1
0
 /**
  * @inheritdoc
  */
 public function actions()
 {
     return array_merge(parent::actions(), ['index' => ['class' => 'backend\\rest\\action\\IndexAction', 'modelClass' => $this->modelClass], 'view' => ['class' => 'yii\\rest\\ViewAction', 'modelClass' => $this->modelClass], 'formattedCategories' => ['class' => 'backend\\modules\\category\\controllers\\actions\\FormattedCategoriesAction', 'modelClass' => $this->modelClass]]);
 }
예제 #2
0
 /**
  * @inheritdoc
  */
 public function actions()
 {
     return array_merge(parent::actions(), ['index' => ['class' => 'backend\\rest\\action\\IndexAction', 'modelClass' => $this->modelClass], 'view' => ['class' => 'yii\\rest\\ViewAction', 'modelClass' => $this->modelClass]]);
 }
예제 #3
0
 public function behaviors()
 {
     return ArrayHelper::merge(parent::behaviors(), ['authenticator' => ['class' => CompositeAuth::className(), 'only' => ['create', 'update'], 'authMethods' => [['class' => HttpBearerAuth::className()], ['class' => QueryParamAuth::className(), 'tokenParam' => 'accessToken']]]]);
 }