Override a package controller
Permalink
I would like to override the Multilingual controller.php file.
Located here: /packages/multilingual/controller.php
How would one go about copying that to the root (local) filesystem to override it?
I have tried creating a package directory called multilingual in the root controllers directory but no dice.
Any help appreciated.
Located here: /packages/multilingual/controller.php
How would one go about copying that to the root (local) filesystem to override it?
I have tried creating a package directory called multilingual in the root controllers directory but no dice.
Any help appreciated.
How do you override a block controller that's inside a package?
Copy the block to application/blocks
Thanks!
I incorrectly asked my question, how do you *extend* a package's block controller?
Your suggestion appears to override (which is what I originally asked). While I can make that work, I'd rather just extend with what I want.
Does that make sense?
I incorrectly asked my question, how do you *extend* a package's block controller?
Your suggestion appears to override (which is what I originally asked). While I can make that work, I'd rather just extend with what I want.
Does that make sense?
Same anSwer but make your new copied controller extend the original one.
Hmmm, no love with that one. It's like the override causes it to ignore the original package controller?
Error:
namespace Application\Block\EventManagerList\Controller; use \Concrete\Package\EventManager\Block\EventManagerList as EventManagerListController; class Controller extends EventManagerListController { }
Error:
Class 'Concrete\Package\EventManager\Block\EventManagerList' not found
It should be
namespace Application\Block\EventManagerList; use \Concrete\Package\EventManager\Block\EventManagerList\Controller as EventManagerListController; class Controller extends EventManagerListController { }
Ahh, that's the key. Thank you, that appears to have done the trick!
Great to hear :)
Hi, Did you ever manage to override/extend a package controller?
Thanks
Thanks
I don't think it's possible.
Overriding a block's controller that's in a package is easy but the package's controller is its "identity" and its installer. Basically overriding it is the same as making it a new and different package.