1
0
Fork 0
mirror of https://github.com/Oreolek/kangana.git synced 2024-05-04 18:18:17 +03:00

after_save event for general CRUD

This commit is contained in:
Alexander Yakovlev 2016-10-12 13:38:36 +07:00
parent 34c6c8bd24
commit 85d02681af

View file

@ -70,6 +70,7 @@ class Controller_Layout extends Controller {
if ($validation->check())
{
$model->save();
$this->afterSave($model);
}
else
{
@ -88,6 +89,15 @@ class Controller_Layout extends Controller {
$this->template->model = $model;
}
/**
* Event after saving the model.
* @param ORM $model
* @return void
**/
protected function after_save($model)
{
}
/**
* Where to redirect after successful model editing.
* @param ORM $model