Skip to content

Commit

Permalink
updates to minor updates to documentation regarding model hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
David McReynolds committed Jan 22, 2014
1 parent c1c6128 commit 71cbe82
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions fuel/modules/fuel/views/_docs/general/models.php
Original file line number Diff line number Diff line change
Expand Up @@ -568,18 +568,18 @@ function __construct()
an array of values to be processed and should return the processed array.</p>
<p>Table class hooks</p>
<ul>
<li><strong>on_before_clean</strong> - executed right before cleaning of values</li>
<li><strong>on_before_validate</strong> - executed right before validate of values</li>
<li><strong>on_before_insert</strong> - executed before inserting values</li>
<li><strong>on_before_clean</strong> - executed right before cleaning of values (before validation and save) and usually passed the raw $_POST data to be saved unless the save values have been specified.</li>
<li><strong>on_before_validate</strong> - executed right before validation of values but after on_before_clean and is passed an array of cleaned data</li>
<li><strong>on_before_insert</strong> - executed before inserting values but after on_before_validate</li>
<li><strong>on_after_insert</strong> - executed after insertion</li>
<li><strong>on_before_update</strong> - executed before updating</li>
<li><strong>on_after_update</strong> - executed after updating</li>
<li><strong>on_before_save</strong> - executed before saving</li>
<li><strong>on_after_save</strong> - executed after saving</li>
<li><strong>on_before_update</strong> - executed before updating and passed an array of cleaned data</li>
<li><strong>on_after_update</strong> - executed after updating and passed an array of cleaned data</li>
<li><strong>on_before_save</strong> - executed before saving and passed an array of cleaned data</li>
<li><strong>on_after_save</strong> - executed after saving and passed an array of cleaned data</li>
<li><strong>on_before_delete</strong> - executed before deleting</li>
<li><strong>on_after_delete</strong> - executed after deleting</li>
<li><strong>on_before_post</strong> - to be called from within your own code right before processing post data</li>
<li><strong>on_after_post</strong> - to be called from within your own code after posting data</li>
<li><strong>on_before_post</strong> - to be called from within your own code right before processing post data and passed the $_POST variables. Simple modules have this hook implemented and you can add this hook to manupulate $_POST values before being saved</li>
<li><strong>on_after_post</strong> - to be called from within your own code after posting data. Simple modules have this hook implemented and the values passed to it is the processed $_POST array after placeholder substitutions and <a href="<?=user_guide_url('general/forms#pre_post_processing')?>">Form_builder post_processing hooks have been run</a>. An example of using this hook would be to access images after they've been uploaded for further manipulation. </li>
<li><strong>on_duplicate</strong> - executed when a record class is duplicated</li>
<li><strong>on_created</strong> - executed when a record class is created</li>
</ul>
Expand Down

0 comments on commit 71cbe82

Please sign in to comment.