code/CMSMenu.php
public static function replace_menu_item(
        $code,
        $menuTitle,
        $url,
        $controllerClass = null,
        $priority = -1,
        $attributes = null,
        $iconClass = null
    ) {
        $item = new CMSMenuItem($menuTitle, $url, $controllerClass, $priority, $iconClass);

        if ($attributes) {
            $item->setAttributes($attributes);
        }

        self::$menu_item_changes[] = array(
            'type' => 'add',
            'code' => $code,
            'item' => $item,
        );
    }
public static function replace_menu_item(
        $code,
        $menuTitle,
        $url,
        $controllerClass = null,
        $priority = -1,
        $attributes = null,
        $iconClass = null
    ) {
        $item = new CMSMenuItem($menuTitle, $url, $controllerClass, $priority, $iconClass);

        if ($attributes) {
            $item->setAttributes($attributes);
        }

        self::$menu_item_changes[] = array(
            'type' => 'add',
            'code' => $code,
            'item' => $item,
        );
    }
public static function replace_menu_item ( $ code , $ menuTitle , $ url , $ controllerClass = null , $ priority = - 1 , $ attributes = null , $ iconClass = null ) { $ item = new CMSMenuItem ( $ menuTitle , $ url , $ controllerClass , $ priority , $ iconClass ) ; if ( $ attributes ) { $ item -> setAttributes ( $ attributes ) ; } self :: $ menu_item_changes [ ] = array ( 'type' => 'add' , 'code' => $ code , 'item' => $ item , ) ; }
Replace a navigation item to the main administration menu showing in the top bar.

@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.
Make sure to add a matching route via {@link Director::$rules} to this url.
@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
Replace a navigation item to the main administration menu showing in the top bar .