entelechy
Active member
I'm extending XFCP_Forum in two separate small addons, both of which work fine individually, but when both are live the effects of one of them are being negated all together.
I've got a few questions about this process:
..but I get an error: Fatal error: Class 'BusinessesButtons\Pub\Controller\ListingPages\Pub\Controller\Forum' not found in /var/www/stadivm.com/html/src/addons/BusinessesButtons/Pub/Controller/Forum.php on line 7
I've got a few questions about this process:
- If I want to replace a single return statement with a condition that could return either of two things, how can that be done through a class extension in an addon? Currently I'm overwriting the entire method with the same method from the core code, and one line being changed, but I know there's got to the a correct way of doing that where I'm not overwriting the entire method.
- If I'm using.. class Forum extends XFCP_Forum .. in one addon called BusinessButtons, how would I extend the extended class in the first addon, in the second addon. I've tried to use this in the second addon.. class Forum extends ListingPages\Pub\Controller\Forum
..but I get an error: Fatal error: Class 'BusinessesButtons\Pub\Controller\ListingPages\Pub\Controller\Forum' not found in /var/www/stadivm.com/html/src/addons/BusinessesButtons/Pub/Controller/Forum.php on line 7
- Is there any issue with creating a chain of extended classes that may all work on the same class in different ways, and extend the modifications made from the previous addon extension(s), or is it better to try to only extend the core class and then work on that? Why?