/var/www/vhosts/nabawater/vendor/yiisoft/yii2/rest
NameSizeModeActions
Action.php35070644editdlrm
ActiveController.php45550644editdlrm
Controller.php29130644editdlrm
CreateAction.php19660644editdlrm
DeleteAction.php10710644editdlrm
IndexAction.php38760644editdlrm
OptionsAction.php13920644editdlrm
Serializer.php106960644editdlrm
UpdateAction.php15330644editdlrm
UrlRule.php99730644editdlrm
ViewAction.php8950644editdlrm
Edit: /var/www/vhosts/nabawater/vendor/yiisoft/yii2/rest/DeleteAction.php (1071B)
* @since 2.0 */ class DeleteAction extends Action { /** * Deletes a model. * @param mixed $id id of the model to be deleted. * @throws ServerErrorHttpException on failure. */ public function run($id) { $model = $this->findModel($id); if ($this->checkAccess) { call_user_func($this->checkAccess, $this->id, $model); } if ($model->delete() === false) { throw new ServerErrorHttpException('Failed to delete the object for unknown reason.'); } Yii::$app->getResponse()->setStatusCode(204); } }