Hi Guys,
Thanks to all your help, I've managed to sort out my propel-load-data
problem. My next mission is to get the hang of mixins. I've read the
section in the book over and over but I can;t quite get my head around
the concept. I want to add the following piece of code to several model
classes:
public function save($con = null)
{
if (!method_exists(sfContext::getInstance()->getUser(), 'getUserID'))
{
return parent::save();
}
if ($this->isNew())
{
$this->setCreatedBy(sfContext::getInstance()->getUser()->getUserId());
}
if ($this->isModified())
{
$this->setUpdatedBy(sfContext::getInstance()->getUser()->getUserId());
}
parent::save();
}
I know I have to add a hook somewhere but I can't work it out from the
examples in the book. Can anyone help?
Thanks.
Tom
--
Tom Haskins-Vaughan
Temple Street Media: Design and Development for the Web
[EMAIL PROTECTED] | www.templestreetmedia.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---