No, the behavior wouldn't automatically pick it up. Also, it accepts only 3 options ('recursive', 'notices', 'autoFields'), so you couldn't pass the array like this:
var $actsAs = array( 'Containable' => array( 'DpageStruct' => array( 'DpageStructField' => array( 'DpageField' => array( 'Language' ), 'HtmlInputType' ) ) ) ); Although, that would be handy. Perhaps there's a good reason for that but I'm barely into my first coffee so I can't say. On Sat, Sep 26, 2009 at 9:32 AM, lorenx <lor...@gmail.com> wrote: > > ...and so > 'contain' => $this->YourModel->contain > is not automatic... > > i guess that > var $order > setting has the same behaviour... > > thanks a lot. > > > > On Sep 26, 3:27 pm, brian <bally.z...@gmail.com> wrote: >> var $contain = array(...); >> >> In controller: >> >> 'contain' => $this->YourModel->contain >> >> >> >> On Sat, Sep 26, 2009 at 5:50 AM, lorenx <lor...@gmail.com> 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 <bally.z...@gmail.com> 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 <lor...@gmail.com> 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---