Wednesday, June 11, 2014

CakePHP 3.0 - Custom helpers not working

Hi everyone,

I'm trying to update my helpers to CakePHP 3.0 but each time I try to load them I get the following error : 

Error: Html could not be found.
Error: Create the class Html below in file: App\View\Helper\Html.php

My AppController looks like : 

public $helpers = [
    'Html' => [
        'className' => 'MyHtml'
    ]
];

And App/View/Helper/MyHtmlHelper.php

use Cake\View\Helper\HtmlHelper;
class MyHtmlHelper extends HtmlHelper { /* ... */ } ;

I followed the instruction right here http://book.cakephp.org/3.0/en/views/helpers.html, even if I didn't see any change since CakePHP 2.3 (except the namespace).

Thanks,

 

--
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: