Navigate the $uses array and set it:

foreach($this->uses as $model)
{
        if (isset($this->$model))
        {
                $this->$model->dataAcoList = $dataAcoList;
        }
}


-MI

---------------------------------------------------------------------------

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-----Mensaje original-----
De: [email protected] [mailto:[EMAIL PROTECTED] En nombre
de Langdon Stevenson
Enviado el: Domingo, 25 de Febrero de 2007 07:00 p.m.
Para: [email protected]
Asunto: Passing value from appController to all models used by an action


Is it possible to make available a value from appController to all of 
the models that are called by an action?

I have some security filtering information that I want to make available 
to all beforeFind callBacks.  The information is gathered by 
appController and currently I use:

    $this->ModelName->dataAcoList = $dataAcoList;


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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