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

Commit

Permalink
Merge pull request #216 from joomlatools/feature/215-menu
Browse files Browse the repository at this point in the history
Do not create admin menu item if the component has no admin functionality
  • Loading branch information
johanjanssens committed Jul 8, 2015
2 parents 1219995 + faca7f2 commit 55969c7
Showing 1 changed file with 6 additions and 1 deletion.
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

0 comments on commit 55969c7

Please sign in to comment.