Add init method in your component:
public function initialize(&$controller) {
$this->controller =& $controller;
}
Use set() everywhere you need:
$this->controller->set()
On Mar 7, 9:24 am, Miles J <[email protected]> wrote:
> So I recently build a Mailer Component that would deal with all the
> emails. But then I ran into the issue, which I forgot about, is that
> set() only works in the controller. So now since im doing it in a
> component, I cant pass any variables to the email.
>
> Is there a work around to this, to not have to do it within a
> controller?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---