Adding callbacks for Propel models in symfony project
September 11th, 2007
This is a simple how-to that describes adding callbacks for Propel models in symfony project
(like those usefull methods in ActiveRecord::Callbacks module).
Step 1 : Enable Propel behaviors in config/propel.ini
propel.builder.AddBehaviors = true // Default value is false |
1 2 3 4 5 6 7 8 9 |
class PageTab extends BasePageTab
{
function preSave(BaseObject $object, $con)
{
}
}
sfMixer::register('BasePageTab:save:pre', array('PageTab', 'preSave')); |
$ symfony propel-build-model |
There is much more detailed article on this topic by François Zaninotto called "Understanding Behaviors"
0 comments »

Hi, my name is Krasimir Angelov. I'm working as web developer.