That works prefectly
On Wednesday, July 23, 2014 12:44:15 PM UTC+2, José Lorenzo wrote:
--The easiest way is to extend the core class and make your controller use it. In you case it is as easy as declaring $viewClass in your AppController:just re-declare that string so it says App\View\View
On Wednesday, July 23, 2014 11:06:33 AM UTC+2, Dieter Gribnitz wrote:Is it currently possible to extend core classes in 3.0?
The namespace convention works with most files but how would I go about doing something like this.
I would like to modify a method in Cake\View\View
Here is what I have tried.
I have copied the cakephp/src/View/View.php file to my src/View/View.php file.
Changed the namespace to:
namespace App\View;
Changed the class to:
class View extends \Cake\View
This file does not seem to get called like the other Controllers, Helpers, Components etc...
Is it possible to override Files like these while leaving the core alone?
In 2.x you could do this with the Lib dir.
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:
Post a Comment