Most often, it is better to override save() and delete() methods in model level, instead of doing in admin generator's actions.class.php, i.e., the view layer. This is how:
Say we are extending the 'MyObj' class. Put the following in file
lib/model/MyObj.php
<?php
/**
* Subclass for representing a row from the table.
*
* @package lib.model
*/
class MyObj extends BaseMyObj
{
// == Extend the model for business logic
public function save($con = null)
{
// == pre save hook
// fill prereq fields
// == call the parent save() method
parent::save($con);
// == post save hook
// fill extra fields
$update_comment = ...;
$this->doAddComment($update_comment);
}
}documented on: 2007.08.22