On Wednesday, February 20, 2013 2:05:49 AM UTC+2, cricket wrote:
>
>
> Better to implement this in a component ... as long as your events 
> will always be triggered from within a controller. That is, you won't 
> be calling it in an afterDelete() callback. From the controller: 
>
> $this->Notifier->send('ModelName', ...); 
>
> Or, maybe pass it a keyed array. In any case, better as a component, imho. 
>

The manual says "To access/use a model in a component is not generally 
recommended" and this will need to access several models (at least the 
EmailNotification model to determine who to send to as well as other models 
to map the specific instance of the updated model to a particular client).

What is the advantage of a component over the other alternatives I raised?

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to