Re: Use Controller in Helper

2009-03-11 Thread mscdex
On Mar 10, 9:09 pm, wolf net netwolf...@gmail.com wrote: Controller: $this-set('controller', $this); view: $controller-action(); IMHO that's a bad idea on many levels. What I meant was something like: $this-set('testResults', $this- CustomComponent-getTest()); Then in the view you use

Use Controller in Helper

2009-03-10 Thread bäckerlehrling
Hello Backers, Im Stuck with this, how would you implement this: I made a CustomController wich method test() calls CustomComponent- getTest() I made a CustomComponent wich methods are setTest() getTest(). I made a CustomHelper wich method is getTest() wich should call the

Re: Use Controller in Helper

2009-03-10 Thread Miles J
Thats completely against the concept, why on earth are you doing it that way? Helpers are used for view support, Components are used for controller support. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP

Re: Use Controller in Helper

2009-03-10 Thread mscdex
On Mar 10, 12:29 pm, bäckerlehrling c.fue...@gmail.com wrote: Now how can i acces the CustomController in the CustomHelper to call the CustomController's CustomComponent Method getTest()? How would you do this? I would do a call to $this-set() in your controller to set a variable to be used

Re: Use Controller in Helper

2009-03-10 Thread wolf net
Controller: $this-set('controller', $this); view: $controller-action(); 2009/3/11 mscdex msc...@gmail.com On Mar 10, 12:29 pm, bäckerlehrling c.fue...@gmail.com wrote: Now how can i acces the CustomController in the CustomHelper to call the CustomController's CustomComponent Method