Re: Component inside helper
i sometimes have to use a helper in a component and otherwise to avoid duplicating code (DRY principle) i guess thats why you need to do that too (otherwise you shouldnt) in this case, though, use App::import(): Helper: function xyz() { App::import('Component', 'Some'); $this->Some = new SomeComponent(); $this->Some->domeSomething(); } On 22 Jul., 10:10, Miles J wrote: > You dont > > Components are for controllers. > Helpers are for views. > Behaviors are for models. > > What exactly are you trying to do? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Component inside helper
You dont Components are for controllers. Helpers are for views. Behaviors are for models. What exactly are you trying to do? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Component inside helper
Then, how can i use this helper inside controller? On Jul 21, 10:07 pm, Miles J wrote: > You dont. Components are for controllers only. > > Build a helper to use in a helper. > > On Jul 21, 11:27 am, Ragnis wrote: > > > > > How can i use my componnt inside helper? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Component inside helper
You dont. Components are for controllers only. Build a helper to use in a helper. On Jul 21, 11:27 am, Ragnis wrote: > How can i use my componnt inside helper? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Component inside helper
How can i use my componnt inside helper? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---