Do not know if i got your idea, but maybe this helps. Save the
original values in the setter of the model. This will only work, if
the model was already hydrated:
----
private $originalTitle = '';
public function setTitle($v)
{
$this->originalTitle = $v;
return parent::setTitle($v);
}
public function save()
{
// do anything you want with this title field
$this->originalTitle .....
}
---
Frank
Am 27.05.2009 um 10:44 schrieb HAUSa:
>
> I'm making my own model save() function. In that function the
> individual fields (like id, title, rank, etc) are already set to the
> new values retrieved from the form.
>
> Now I want to use the previous version of a value in the save
> function, the value a field had before it got changed.
>
> Is that possible?
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---