Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Do not create admin menu item if the component has no admin functionality #216

Merged
merged 1 commit into from
Jul 8, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/libraries/cms/installer/adapter/component.php
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,12 @@ protected function _buildAdminMenus()
// Ok, now its time to handle the menus. Start with the component root menu, then handle submenus.
$menuElement = $this->manifest->administration->menu;

if ($menuElement)
// @TODO: Just do not create the menu if $menuElement not exist
if (in_array((string) $menuElement['hidden'], array('true', 'hidden')))
{
return true;
}
elseif ($menuElement)
{
$data = array();
$data['menutype'] = 'main';
Expand Down