Adds items to the menu that appears on the left side of the main menu.
191787
private function generateLeftMenu()
    {
        $leftMenu = \Menu::getMenu('leftMenu');

        $leftMenu->link('docs', function (Link $link) {
            $link->name = 'Documentation';
            $link->url  = route('larecipe.index');
        });
    }
482151
public void addNavButtons()
    {
        if ((m_iDisplayFieldDesc & ScreenConstants.SELECT_MODE) != ScreenConstants.SELECT_MODE)
            new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, MenuConstants.DELETE, MenuConstants.DELETE, null);
        if (!(this.getParentScreen() instanceof Screen))
            super.addNavButtons();  // Only allow form screen if not sub-window
    }
868362
public function addadminmenu(){
		$rules=array(
			(object)array(
				'com' => 'admin',
				'position' => 'adminmenu',
				'segments' => array('view'=>'adminmenu')
				),
			(object)array(
				'com' => 'admin',
				'position' => 'userpanel',
				'segments' => array('view'=>'userpanel','uid')
				),
				);
		$this->rules=array_merge($this->rules,$rules);
		}
19374
private void showSystemMenu() {
        Insets insets = rootPane.getInsets();
        windowMenu.show(menuButton, getX() - insets.left - insets.right,
            getY() + this.getPreferredSize().height);
    }
1148494
def add_toolbars_to_menu(self, menu_title, actions):
        """"""
        # Six is the position of the view menu in menus list
        # that you can find in plugins/editor.py setup_other_windows.
        view_menu = self.menus[6]
        if actions == self.toolbars and view_menu:
            toolbars = []
            for toolbar in self.toolbars:
                action = toolbar.toggleViewAction()
                toolbars.append(action)
            add_actions(view_menu, toolbars)
950609
def add_menu_items_for_pages(self, pagequeryset=None, allow_subnav=True):
        """"""
        item_manager = self.get_menu_items_manager()
        item_class = item_manager.model
        item_list = []
        i = item_manager.count()
        for p in pagequeryset.all():
            item_list.append(item_class(
                menu=self, link_page=p, sort_order=i, allow_subnav=allow_subnav
            ))
            i += 1
        item_manager.bulk_create(item_list)
159048
public function addSideMenuItems($owner, $code, array $definitions)
    {
        foreach ($definitions as $sideCode => $definition) {
            $this->addSideMenuItem($owner, $code, $sideCode, (array) $definition);
        }
    }
908317
public function addMainMenuItems($owner, array $definitions)
    {
        foreach ($definitions as $code => $definition) {
            $this->addMainMenuItem($owner, $code, $definition);
        }
    }
1067049
def add_seperator(self):
        
        m_item = Gtk.SeparatorMenuItem()
        self.menu.append(m_item)
        self.menu.show_all()
347952
public static JMenu leftShift(JMenu self, String str) {
        self.add(str);
        return self;
    }
1112182
def register_menu_item(self, items):
        
        for itm in items:
            if itm.group in self.menu_items:
                # Only add the menu item if we don't already have it registered
                if itm not in self.menu_items[itm.group]['items']:
                    self.menu_items[itm.group]['items'].append(itm)
            else:
                logger.warning('Tried registering menu item to unknown group {}'.format(itm.group))
827694
public void addMenuItem(Runnable item) {
        items.add(item);
        if (item instanceof Menu) {
        	((Menu) item).parent = this;
        }
    }
1162157
protected function initializeMenus()
    {
        foreach ($this->config('menu') as $name => $config) {
            Menu::create($name, $config);
        }

        // Add default menu items to sidebar
        if ($appshellMenu = Menu::get('appshell')) {
            // CRM Group
            $crm = $appshellMenu->addItem('crm_group', __('CRM'));

            $crm
                ->addSubItem('customers', __('Customers'), ['route' => 'appshell.customer.index'])
                ->data('icon', 'accounts-list')
                ->allowIfUserCan('list customers');

            // Settings Group
            $settings = $appshellMenu->addItem('settings_group', __('Settings'));

            $settings
                ->addSubItem('users', __('Users'), ['route' => 'appshell.user.index'])
                ->data('icon', 'accounts')
                ->allowIfUserCan('list users');
            $settings
                ->addSubItem('roles', __('Permissions'), ['route' => 'appshell.role.index'])
                ->data('icon', 'shield-security')
                ->allowIfUserCan('list roles');
            $settings
                ->addSubItem('settings', __('Settings'), ['route' => 'appshell.settings.index'])
                ->data('icon', 'settings')
                ->allowIfUserCan('list settings');
        }
    }
112035
protected function installMenus()
    {
        $file = app_path('menus.php');

        if (!file_exists($file)) {
            $contents = $this->laravel['files']->get(__DIR__.'/stubs/menus.txt');

            $this->laravel['files']->put($file, $contents);

            $this->info("Created : {$file}");
        } else {
            $this->error("File already exists at path : {$file}");
        }
    }
590660
def add_menu(self, name, link=None):
        """"""
        if self.menu_began:
            if self.menu_separator_tag:
                self.write(self.menu_separator_tag)
        else:
            # First time, create the menu tag
            self.write('<ul class="horizontal">')
            self.menu_began = True

        self.write('<li>')
        if link:
            self.write('<a href="{}">', self._rel(link))

        # Write the real menu entry text
        self.write(name)

        if link:
            self.write('</a>')
        self.write('</li>')
584856
public void installMenu() {

        // initialize the menu groups
        m_groupContainer.clear();

        // creates the context help menu
        CmsAdminMenuGroup helpMenu = new CmsAdminMenuGroup(
            "help",
            Messages.get().getBundle(getLocale()).key(Messages.GUI_ADMIN_MENU_HELP_GROUP_0));
        helpMenu.addMenuItem(new CmsAdminContextHelpMenuItem());
        addGroup(helpMenu);

        Iterator<CmsTool> itElems = getToolManager().getToolsForPath(
            this,
            getToolManager().getBaseToolPath(this),
            false).iterator();
        while (itElems.hasNext()) {
            CmsTool tool = itElems.next();
            // check visibility
            String link = tool.getHandler().getLink();
            if (link.indexOf("?") > 0) {
                link = link.substring(0, link.indexOf("?"));
            }
            if (!getCms().existsResource(link) || !tool.getHandler().isVisible(this)) {
                continue;
            }

            // cut out the base
            String path = tool.getHandler().getPath().substring(getToolManager().getBaseToolPath(this).length());
            // special case of the base tool
            if (CmsStringUtil.isEmpty(path)) {
                continue;
            }
            // skip initial '/'
            int pos = tool.getHandler().getPath().indexOf(CmsToolManager.TOOLPATH_SEPARATOR);
            // only install if at first level
            if (path.indexOf(CmsToolManager.TOOLPATH_SEPARATOR, pos + 1) < 0) {

                addItem(
                    tool.getHandler().getGroup(),
                    tool.getHandler().getShortName(),
                    tool.getHandler().getSmallIconPath(),
                    CmsToolManager.linkForToolPath(getJsp(), tool.getHandler().getPath()),
                    tool.getHandler().isEnabled(this)
                    ? tool.getHandler().getHelpText()
                    : tool.getHandler().getDisabledHelpText(),
                    tool.getHandler().isEnabled(this),
                    tool.getHandler().getPosition(),
                    CmsAdminMenu.DEFAULT_TARGET);
            }
        }
    }
1005069
def _append(self, menu):
        ''''''
        menu.Append(self.id(), self.name, self.description)