/** * Поведения * @return array */ public function behaviors() { $beh = parent::behaviors(); $beh['verbs'] = ['class' => VerbFilter::className(), 'actions' => ['delete' => ['post'], 'groupdelete' => ['post']]]; return $beh; }
/** * @inheritdoc */ public function behaviors() { $beh = parent::behaviors(); $beh['contentNegotiator'] = ['class' => ContentNegotiator::className(), 'formats' => ['application/json' => Response::FORMAT_JSON], 'except' => ['index']]; return $beh; }