? ? Pending

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
23 Feb 2020

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.

Summary of Changes

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.

Testing Instructions

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:
image

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.

Expected result

The dashboard has the dashboard menu with the correct preset loaded.

Actual result

The dashboard is empty

Documentation Changes Required

Dashboard related stuff needs to be documented in general.

avatar Bakual Bakual - open - 23 Feb 2020
avatar Bakual Bakual - change - 23 Feb 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Feb 2020
Category Libraries
avatar brianteeman
brianteeman - comment - 23 Feb 2020

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.

avatar brianteeman brianteeman - test_item - 23 Feb 2020 - Tested successfully
avatar mbabker
mbabker - comment - 23 Feb 2020

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.

avatar Bakual
Bakual - comment - 23 Feb 2020

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.

avatar wilsonge
wilsonge - comment - 29 Feb 2020

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

avatar astridx
astridx - comment - 1 Mar 2020

I tested this PR with and without George's suggestions. It was successful both times.

@Bakual If you like I submitted my changes as a PR.

Control Panel   test   Administration(1)

avatar astridx
astridx - comment - 1 Mar 2020

I have tested this item successfully on c8f1e48


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28027.

avatar astridx astridx - test_item - 1 Mar 2020 - Tested successfully
avatar Bakual Bakual - change - 1 Mar 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 1 Mar 2020
Category Libraries Administration Language & Strings Libraries
avatar astridx
astridx - comment - 1 Mar 2020

I have tested this item successfully on 41230aa


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28027.

avatar astridx astridx - test_item - 1 Mar 2020 - Tested successfully
avatar wilsonge wilsonge - change - 2 Mar 2020
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: ?
avatar wilsonge wilsonge - close - 2 Mar 2020
avatar wilsonge wilsonge - merge - 2 Mar 2020

Add a Comment

Login with GitHub to post a comment