When I tried to use a Helper in Component or Controller by App:import(),
the value of webroot is NULL.
Some user try to use a Helper in a view, that rendered from
libs/controller/pages_controller.php. This controller loads only HtmlHelper.
When a view want to use other helpers, App::import() is called in foo.ctp.
webroot of this helper has NULL.
--
maya
On Sat, Feb 27, 2010 at 2:08 AM, John Andersen <j.andersen.lv@gmail.com> wrote:
> What are you trying to do?
> I would never use a Helper in a model, a helper is supposed to be used
> in a View!
> So please try to describe what you want to accomplish with a Helper in
> the Model!
> Enjoy,
> John
>
> On Feb 26, 5:59 am, maya <maya.neg...@gmail.com> wrote:
>> Hi,
>>
>> Im using Form helper in a Model like this.
>>
>> > App::import('Helper','Form');
>> > $form = new FormHelper();
>>
>> But $form->webroot is NULL, it is not able to read.
>> Is it a bug or by design?
>>
>> Thanks,
>>
>> --
>> maya
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment