fire events on template updates

This commit is contained in:
Jmeyering 2014-07-14 02:38:52 +00:00
parent f7f81822ec
commit 5604a095fc
1 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,7 @@
<?php namespace Cms\Controllers;
use Config;
use Event;
use URL;
use Lang;
use Flash;
@ -157,6 +158,7 @@ class Index extends Controller
$template->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()