Reasoning for why plugin controllers aren't prioritised?
Permalink
I'm trying to build a plugin that replaces a default concrete5 page, the /dashboard.
What I have done is to change the pkgID on the "/dashboard/view.php" entry in the Pages table to my plugin's id.
This is working for replacing the view however not for replacing the controller. I have noticed that in the loader library a plugin's controller is only loaded as a last resort. This means that if you want to replace a default controller you will never be able to do it in a plugin.
I was wondering about the reasoning behind this and why a plugin's controller doesn't get chosen first instead of last?
What I have done is to change the pkgID on the "/dashboard/view.php" entry in the Pages table to my plugin's id.
This is working for replacing the view however not for replacing the controller. I have noticed that in the loader library a plugin's controller is only loaded as a last resort. This means that if you want to replace a default controller you will never be able to do it in a plugin.
I was wondering about the reasoning behind this and why a plugin's controller doesn't get chosen first instead of last?
in the install() method then remove it in the uninstall() method