class Observer_Registrant extends \Orm\Observer
{
public function after_create(Orm\Model $model)
{
if(strtolower(get_class($model)) != "model_registrant" && empty($model->idRegistrant)){
$model->idRegistrant = Session::get('idRegistrant', null);
}
}
}
MODEL
public function save($cascade = null, $use_transaction = false){
// My code here
return parent::save($cascade, $use_transaction);
}
BASE MODEL
public function save($cascade = null, $use_transaction = false){
return parent::save($cascade, $use_transaction);
}
It looks like you're new here. If you want to get involved, click one of these buttons!