Дипломная работа: Автоматизация контроля качества работы персонала в ИП Мельникова

Внимание! Если размещение файла нарушает Ваши авторские права, то обязательно сообщите нам
122
/**
* Deletes an existing SettlementAccount model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
* @throws NotFoundHttpException if the model cannot be found
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
return $this->redirect(['index']);
}
/**
* Finds the SettlementAccount model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return SettlementAccount the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
123
protected function findModel($id)
{
if (($model = SettlementAccount::findOne($id)) !== null) {
return $model;
}
throw new NotFoundHttpException('The requested page does not exist.');
}
}
Источник: https://baza.diplomsite.ru/previewfile/245