public function actions() { $actions = parent::actions(); $actions = ['password' => ['class' => 'yii\\rest\\CreateAction', 'modelClass' => $this->modelClass], 'options' => $actions['options']]; $actions['options']['collectionOptions'] = []; $actions['options']['resourceOptions'] = []; if (Yii::$app->request->url === '/forgot/password/') { $actions['options']['collectionOptions'] = $this->verbs()['password']; } if (Yii::$app->request->url === '/forgot/reset/') { $actions['options']['collectionOptions'] = $this->verbs()['reset']; } return $actions; }
public function actions() { $actions = parent::actions(); $actions = ['index' => null, 'options' => $actions['options']]; return $actions; }
public function actions() { $actions = parent::actions(); $actions = ['index' => ['class' => '\\app\\controllers\\profile\\ViewAction', 'modelClass' => $this->modelClass, 'checkAccess' => [$this, 'checkAccess']], 'update' => ['class' => '\\app\\controllers\\profile\\UpdateAction', 'modelClass' => $this->modelClass, 'checkAccess' => [$this, 'checkAccess'], 'scenario' => $this->updateScenario], 'password' => ['class' => '\\app\\controllers\\profile\\PasswordAction', 'modelClass' => $this->modelClass, 'checkAccess' => [$this, 'checkAccess']], 'avatar' => ['class' => '\\app\\controllers\\profile\\AvatarAction', 'modelClass' => $this->avatarClass, 'checkAccess' => [$this, 'checkAccess']], 'options' => $actions['options']]; return $actions; }