joomla-cms
joomla-cms copied to clipboard
FileLayout instantiation limitation in ToolbarButton::renderButton() removed
Pull Request for Issue #36597 .
Summary of Changes
override the renderButton() method in ToolbarButton to remove the limitations of FileLayout Instantiation in modules tab
Testing Instructions
Create a module that uses button layout from a component if you are able to access the component button layout, the test is successful.
Actual result BEFORE applying this Pull Request
Firstly, create a module that uses button layout from a component Earlier, you were unable to access the component button layout.
Expected result AFTER applying this Pull Request
after the commit, you will be able to access the component button layout.
Documentation Changes Required
No major changes required
This pull request has automatically rebased to 4.2-dev.
This pull requests has been automatically converted to the PSR-12 coding standard.
This pull request has been automatically rebased to 4.3-dev.
Thank you Akshit @akshitrattan for this PR. I have asked the maintainers about the implementation and it looks like it would be best to make it similar to the FormField class and call getRenderer() https://github.com/joomla/joomla-cms/blob/e2170c8a6224ebb6ed754853de0d5e1b97ba1ce9/libraries/src/Form/FormField.php#L1331 (thank you Fedir @Fedik)
@BrainforgeUK can you give an example code how this should work? wouldn't it be enough to add options to the renderButton option array which can be used for the basePath and the options on FileLayout?
also pining @akshitrattan
This pull request has been automatically rebased to 5.2-dev.