? ? ? Pending

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
7 Feb 2020

Pull Request for Issue #27765.

Summary of Changes

This changes the Installer ComponentAdapter so it reads optional menuitem parameters from the XML and puts them into the #__menu table.

This allows to set menuitem params for the admin menu during component installation.
This is especially interesting so we can add dashboard and quicktask links to our component submenus.
The XML structure for params in a menu or submenu will look like this

<administration>
	<menu>
		COM_FOO
		<params>
			<param1>value1</param1>
		</params>
	</menu>
	<submenu>
		<menu view="bar">
			COM_FOO_MENU_BAR
			<params>
				<param2>value2</param2>
				<param3>value3</param3>
			</params>
		</menu>
	</submenu>
</administration>

Testing Instructions

You can either adjust the XML manifest of a component of your choice, or use my SermonSpeaker component where I added params to show a dashboard link and a quicktask link.
com_sermonspeaker.zip

Expected result

With my component you'll see dashboard and quicktask icons in the component submenu:
image

If you do it with another component, you can also check the #__menu table entry and see if the params column got an entry like you specified it.

Actual result

There is no possibility to add params during installation (without a scriptfile)

Documentation Changes Required

That should be added to the "Develop a 4.0 component" (or how that is called) doc. If there is another doc for the component manifest, it should be added there as well.

avatar Bakual Bakual - open - 7 Feb 2020
avatar Bakual Bakual - change - 7 Feb 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Feb 2020
Category Libraries
avatar brianteeman brianteeman - test_item - 7 Feb 2020 - Tested successfully
avatar brianteeman
brianteeman - comment - 7 Feb 2020

I have tested this item successfully on 66a3e3c

Awesome - definitely needs documentation


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

avatar richard67 richard67 - test_item - 8 Feb 2020 - Tested successfully
avatar richard67
richard67 - comment - 8 Feb 2020

I have tested this item successfully on 66a3e3c


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

avatar richard67
richard67 - comment - 8 Feb 2020

Cool, what a few lines of code can do in J4 if they are clever made.

@brianteeman I don't think the documentation needed should keep me from setting RTC, or should it? And should I set label "Documenation required"? Feedback welcome.

avatar richard67 richard67 - change - 8 Feb 2020
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 8 Feb 2020

RTC


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

avatar richard67 richard67 - change - 8 Feb 2020
Labels Added: ? ? ?
avatar brianteeman
brianteeman - comment - 8 Feb 2020

I see you have done what you asked which is correct

avatar infograf768 infograf768 - change - 8 Feb 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-02-08 18:15:34
Closed_By infograf768
Labels
avatar infograf768 infograf768 - close - 8 Feb 2020
avatar infograf768 infograf768 - merge - 8 Feb 2020
avatar infograf768
infograf768 - comment - 8 Feb 2020

tks

Add a Comment

Login with GitHub to post a comment