Add extension hooks to blog entry form (so we can customise management form)

This commit is contained in:
Morven Lewis-Everley 2014-08-05 14:28:47 +01:00
parent 095a97018e
commit fa324f2f2c

View File

@ -283,6 +283,8 @@ class BlogHolder_Controller extends BlogTree_Controller {
} else {
$form->loadDataFrom(array("Author" => Cookie::get("BlogHolder_Name")));
}
$this->extend("updateBlogEntryForm", $form);
return $form;
}
@ -312,9 +314,13 @@ class BlogHolder_Controller extends BlogTree_Controller {
if(Object::has_extension($this->ClassName, 'Translatable')) {
$blogentry->Locale = $this->Locale;
}
$this->extend("onBeforePostBlog", $blogentry);
$blogentry->writeToStage("Stage");
$blogentry->publish("Stage", "Live");
$this->extend("onAfterPostBlog", $blogentry);
$this->redirect($this->Link());
}