Monday, June 9, 2014

Re: Extending FormHelper causes error in it

I find it difficult to understand where you added the useTag() function.
If it is in the FormHelper.php class, you probably need to use

echo $this->Form->useTag(...)

If you have it in your own Helper class LanguageHelper (a much better solution so not to change the CakePHP's core), you will need to ensure your LanguageHelper is "used" in the Controller.
e.g.
public $helpers = array( 'Language' );

If you just have one function, perhaps it's easier to add it to View/Helper/AppHelper.php and have it available in all the helpers.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: