var $contain = array(...); In controller:
'contain' => $this->YourModel->contain On Sat, Sep 26, 2009 at 5:50 AM, lorenx <[email protected]> wrote: > > sorry... i didn't explain it well at all! :P > i meant this: if it is possible to set in the model file the "contain" > array with all the details; > > 'contain' => array( > 'DpageStruct' => array( > 'DpageStructField' => array( > 'DpageField' => array( > 'Language' > ), > 'HtmlInputType' > ) > ) > ) > > otherwise i have to repeat it in all the find() that need it... > > thanks. > > > > On Sep 25, 10:00 pm, brian <[email protected]> wrote: >> Do you mean that you only want that one model to implement it? Yes, >> you can do that. The syntax is exactly the same as with AppModel: >> >> var $actsAs = array('Containable'); >> >> or (PHP5 only) >> >> public $actsAs = array('Containable'); >> >> >> >> On Fri, Sep 25, 2009 at 1:46 PM, lorenx <[email protected]> wrote: >> >> > hi all. >> >> > is it possible to set the containable behaviour of a model in its >> > model file? >> > just to set it once, staticly... maybe with the ability to change it >> > on the fly when needed... >> >> > thanks > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
