User tests: Successful: Unsuccessful:
Pull Request for Issue #27765
When a 3rd party component wants to use the dashboard, they would have to manually create the submenu module and assign the preset and all the needed parameters.
This PR tries to make that simpler by providing a function in the InstallerScript which can be called.
Adds the method addDashboardMenu to the InstallerScript
To use it, an extension can simply call $this->addDashboardMenu('foo', 'bar'); in it's custom install script. The first argument is the dashboard name as declared in the component adminmenu structure (see #27849), the second argument is the name of the preset the submenu module should load.
Eitehr adjust a 3rd party component to use a dashboard, or use my component where I added those calls for testing.
com_sermonspeaker.zip
Click on the dashboard icon next to the component name (or wherever you added the dashboard menuitem). In my component it is here:

Note: If you install my component more than once, you will get multiple menu modules. This is not a bug in this PR but one in my component script.
The dashboard has the dashboard menu with the correct preset loaded.
The dashboard is empty
Dashboard related stuff needs to be documented in general.
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries |
There isn't a way to do this without introducing an architectural coupling between the installer library API and com_modules? The libraries API packages really should not have dependencies to components.
There isn't a way to do this without introducing an architectural coupling between the installer library API and com_modules?
I thought quite a bit for a more elegant solution and didn't get further than that.
I think the InstallerScript is a special case anyway. I see it more as a collection of methods to help extension developers. So they don't have to invent the wheel themself.
I think the InstallerScript is a special case anyway. I see it more as a collection of methods to help extension developers
That's pretty much how I see it too. I'd agree with Michael as a more general case though
I have tested this item
| Labels |
Added:
?
|
||
| Category | Libraries | ⇒ | Administration Language & Strings Libraries |
I have tested this item
| Status | Pending | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-03-02 08:58:52 |
| Closed_By | ⇒ | wilsonge | |
| Labels |
Added:
?
|
||
I have tested this item✅ successfully on c8f1e48
great stuff
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28027.