Re: How to access base model functions from a related behavior model

2012-08-20 Thread Tilen Majerle
Ok..than its better if you create new behavior and functions you pass into it..and ijclude this behavior to all models where you need this function..:) Dne ponedeljek, 20. avgust 2012 je poĊĦiljatelj kevin.ncbible < ke...@ncbible.com> napisal: > Thank you, Tilen -- I really appreciate you sharing y

Re: How to access base model functions from a related behavior model

2012-08-20 Thread kevin.ncbible
Thank you, Tilen -- I really appreciate you sharing your time and talents: if you have associated Topic and TopicTree, than you can access in > controller with $this->TopicTree->Topic This first approach seems the most "elegant," but should I be trying to associate two models based on the same

Re: How to access base model functions from a related behavior model

2012-08-20 Thread Tilen Majerle
if you have associated Topic and TopicTree, than you can access in controller with $this->TopicTree->Topic, if you don't have accociated this 2 models, than you can use $this->loadModel('Topic'); in your controller, and then $this->Topic->myFunction(); -- Lep pozdrav, Tilen Majerle http://majerle.e

Re: How to access base model functions from a related behavior model

2012-08-20 Thread kevin.ncbible
oops: in above, it should have read: e.g., my Clause model, with a one-to-one association to *Topic* -- 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, sen

How to access base model functions from a related behavior model

2012-08-20 Thread kevin.ncbible
Hi. Thank you, again, for helping. I have a basic model (Topic), with functions, e.g., MyFunction(), and another model that is a behavior (TopicTree), based on the same underlying table: public $useTable = 'topics'; public $name = 'TopicTree'; public $actsAs = array('Tree'); So,