code/CMSMenu.php
public static function add_menu_item(
        $code,
        $menuTitle,
        $url,
        $controllerClass = null,
        $priority = -1,
        $attributes = null,
        $iconClass = null
    ) {
        // If a class is defined, then force the use of that as a code.  This helps prevent menu item duplication
        if ($controllerClass) {
            $code = self::get_menu_code($controllerClass);
        }

        return self::replace_menu_item(
            $code,
            $menuTitle,
            $url,
            $controllerClass,
            $priority,
            $attributes,
            $iconClass
        );
    }
public static function add_menu_item(
        $code,
        $menuTitle,
        $url,
        $controllerClass = null,
        $priority = -1,
        $attributes = null,
        $iconClass = null
    ) {
        // If a class is defined, then force the use of that as a code.  This helps prevent menu item duplication
        if ($controllerClass) {
            $code = self::get_menu_code($controllerClass);
        }

        return self::replace_menu_item(
            $code,
            $menuTitle,
            $url,
            $controllerClass,
            $priority,
            $attributes,
            $iconClass
        );
    }
public static function add_menu_item ( $ code , $ menuTitle , $ url , $ controllerClass = null , $ priority = - 1 , $ attributes = null , $ iconClass = null ) { // If a class is defined, then force the use of that as a code.  This helps prevent menu item duplication if ( $ controllerClass ) { $ code = self :: get_menu_code ( $ controllerClass ) ; } return self :: replace_menu_item ( $ code , $ menuTitle , $ url , $ controllerClass , $ priority , $ attributes , $ iconClass ) ; }
Add a navigation item to the main administration menu showing in the top bar.

uses {@link CMSMenu::$menu_items}

@param string $code Unique identifier for this menu item (e.g. used by {@link replace_menu_item()} and
{@link remove_menu_item}. Also used as a CSS-class for icon customization.
@param string $menuTitle Localized title showing in the menu bar
@param string $url A relative URL that will be linked in the menu bar.
@param string $controllerClass The controller class for this menu, used to check permisssions.
If blank, it's assumed that this is public, and always shown to users who
have the rights to access some other part of the admin area.
@param int $priority
@param array $attributes an array of attributes to include on the link.
@param string $iconClass

@return bool Success
Add a navigation item to the main administration menu showing in the top bar .