Tuesday, September 1, 2015

Access helper's functions in controller for cakephp 3.x

I have stucked in my cakephp3 code where I want to use the helper in my controller.

I have done it in cakephp 2 using below code and want to convert this in cakephp3 standard so can you please help me out to resolve this issue which will be really great for me.


CAKEPHP2 CODE
----------------------------------------------------------------------------------------------------------------------------
App::import('Helper', 'Userright');
$this->View = new View($this->Controller);
$this->Userright = new UserrightHelper($this->View); 
----------------------------------------------------------------------------------------------------------------------------

Above code is having custom helper which is having rights management as per my admin portal so i want to use it in controller for cakphp3 standard.

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