diff --git a/modules/cms/controllers/Index.php b/modules/cms/controllers/Index.php index e14845c5d..21d67023b 100644 --- a/modules/cms/controllers/Index.php +++ b/modules/cms/controllers/Index.php @@ -1,6 +1,7 @@ fill($templateData); $template->save(); + Event::fire('cms.template.afterSave', [$type]); Flash::success(Lang::get('cms::lang.template.saved')); @@ -224,6 +226,7 @@ class Index extends Controller $error = $ex->getMessage(); } + Event::fire('cms.template.afterDelete', [$type]); return [ 'deleted' => $deleted, 'error' => $error, @@ -236,8 +239,10 @@ class Index extends Controller $this->validateRequestTheme(); $this->loadTemplate( - Request::input('templateType'), + Request::input('templateType'), trim(Request::input('templatePath')))->delete(); + + Event::fire('cms.template.afterDelete', [$type]); } public function onGetTemplateList()