public function custom_menu($custommenuitems = '') {
        global $CFG;

        if (empty($custommenuitems) && !empty($CFG->custommenuitems)) {
            $custommenuitems = $CFG->custommenuitems;
        }
        $custommenu = new custom_menu($custommenuitems, current_language());
        return $this->render_custom_menu($custommenu);
    }
public function custom_menu($custommenuitems = '') {
        global $CFG;

        if (empty($custommenuitems) && !empty($CFG->custommenuitems)) {
            $custommenuitems = $CFG->custommenuitems;
        }
        $custommenu = new custom_menu($custommenuitems, current_language());
        return $this->render_custom_menu($custommenu);
    }
public function custom_menu ( $ custommenuitems = '' ) { global $ CFG ; if ( empty ( $ custommenuitems ) && ! empty ( $ CFG -> custommenuitems ) ) { $ custommenuitems = $ CFG -> custommenuitems ; } $ custommenu = new custom_menu ( $ custommenuitems , current_language ( ) ) ; return $ this -> render_custom_menu ( $ custommenu ) ; }
Returns the custom menu if one has been set

A custom menu can be configured by browsing to
Settings: Administration > Appearance > Themes > Theme settings
and then configuring the custommenu config setting as described.

Theme developers: DO NOT OVERRIDE! Please override function
{@link core_renderer::render_custom_menu()} instead.

@param string $custommenuitems - custom menuitems set by theme instead of global theme settings
@return string
Returns the custom menu if one has been set