Closed flakerimi closed 8 years ago
It hasn't been implemented, because this feature potentially can slow down the system significantly. But I have an idea. Let me have a look.
Awesome, let me know when you got something, even extending a class could be great.
Let say class MyDb extends Db will would be great to add custom methods, just like that I did days ago
With this change you should be able to set view overrides from within a plugin. One of the best places to do that is by catching an event. E.g.
<?php
namespace Plugin\Application;
class Event
{
public static function ipBeforeController()
{
\Ip\View::registerOverride(ipFile('Ip/Internal/Admin/view/login.php'), ipFile('Plugin/Application/view/newLogin.php'));
}
}
Sounds good? Works for you?
Well this is good for views but I would love to have something to extend IP. I dont want to touch core, but sometimes you need to. Currently I am using Theme/override but having that for each plugin would be great or somewhere to autoload custom classes
It is not recommended, but extra easy. Just add
require_once('Path to your own file');
in index.php file. And that's it. Your file will be used instead of the default one.
Is possible to have same feature as Theme, an override folder when you can override certain files if plugin is enabled?