Extend CMS controller base from framework class #5005
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Executive Summary
Extends JControllerBase from it's framework counterpart class
Detailed Summary
This extends
JControllerBase
from the Frameworks/Joomla/Controller/AbstractController
class. This means it's implements the frameworks interface giving forward compatibility to the future when we will only use that class. In order to do this I have also had to introducesetApplication()
andsetInput()
methods to reflect those in the frameworks class, the protected$app
and$input
variables are deprecated in favour of the private variables contained in the frameworks class (these cannot be used for b/c reasons)As in 3.4
JApplicationBase
now extends/Joomla/Application/AbstractApplication
I have changed the typehinting in our constructor to allow anything extending this class to be injected (note thesetApplication()
method must still typehintJApplicationBase
to be consistent with the interface unfortunately.I've also changed the
loadApplication()
doc block to return aJApplicationCms
asJFactory::getApplication()
always returns said objectTesting
To test this PR you can see the unit tests pass and try using com_config (frontend and backend) to ensure everything there continues to work as expected - as this is the only component currently using the new MVC classes.