joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

FileLayout instantiation limitation in ToolbarButton::renderButton() removed

Open akshitrattan opened this issue 3 years ago • 2 comments

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

akshitrattan avatar Jan 12 '22 18:01 akshitrattan

This pull request has automatically rebased to 4.2-dev.

HLeithner avatar Jun 27 '22 13:06 HLeithner

This pull requests has been automatically converted to the PSR-12 coding standard.

joomla-bot avatar Jun 27 '22 21:06 joomla-bot

This pull request has been automatically rebased to 4.3-dev.

HLeithner avatar May 02 '23 16:05 HLeithner

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)

obuisard avatar Jun 21 '23 13:06 obuisard

@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?

HLeithner avatar Oct 05 '23 07:10 HLeithner

also pining @akshitrattan

HLeithner avatar Oct 05 '23 07:10 HLeithner

This pull request has been automatically rebased to 5.2-dev.

HLeithner avatar Apr 24 '24 09:04 HLeithner