I was going to suggest this as well. The beforeSave function fires
before save/validation and you can access $this->data and modify it as
you see fit. As long as you return true, the script will continue none
the wiser.

- James

On Jul 10, 1:20 pm, Joe <[EMAIL PROTECTED]> wrote:
> You could use beforeSave
>
> On Jul 10, 9:30 am, CrazyDave <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I've been wanting to include some extra functionality in a model but
> > wanted to know the best CakePHP way of going about things.
>
> > For example we've got controllers and components, then views and
> > helpers.
>
> > I want my model to "behave" as normal but say use something like a
> > helper to process the text before saving / validation.  I did think
> > about processing certain content in the model with Geshi but could see
> > no easy way of doing so with adding it in all the models required or
> > the appmodel.
>
> > Should behaviours be used for this sort of thing?  As it doesn't quite
> > seem right to me at the moment.
>
> > Thanks for any help,
> > Dave
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to