octoberCMS | extra actions during creation into plugin created on "Builder" -
imagine have plugin gallery
made on builder
, , after creation of slide
want actions...
imagine want create slide
changes plugin... (after redirect /update/:id
)
so understand need extend constructor
?
i need adding class <body>
...
here's example:
public function update($id) { $this->bodyclass = 'compact-container'; return $this->asextension('formcontroller')->update($id); }
this function called before generation of page, , need similar after creation of "slide"
i have analyzed file modules/backend/behaviors/formcontroller.php
, found these functions, can me actions after , before creating things on plugins:
/** * called before creation or updating form saved. * @param model */ public function formbeforesave($model) { } /** * called after creation or updating form saved. * @param model */ public function formaftersave($model) { }
all need do, put function controller's file
Comments
Post a Comment