Set the menu items (allows for overruling in subclasses)

@param \Gems_Menu_MenuList $menuList
494396
protected function addButtons(\Gems_Menu_MenuList $menuList)
    {
        if ($this->addCurrentParent) {
            $menuList->addCurrentParent($this->_('Cancel'));
        }
        if ($this->addCurrentSiblings) {
            $menuList->addCurrentSiblings($this->anyParameterSiblings);
        }
        if ($this->addCurrentChildren) {
            $menuList->addCurrentChildren();
        }
        // \MUtil_Echo::track($this->addCurrentParent, $this->addCurrentSiblings, $this->addCurrentChildren, count($menuList));
    }
225581
public void setMenuPopup(boolean menuPopup) {
		table.getTableHeader().removeMouseListener(this);

		if (menuPopup) {
			table.getTableHeader().addMouseListener(this);
		}
		
		this.menuPopup = menuPopup;
	}
45059
public function setMenu(\Wucdbm\Bundle\MenuBuilderBundle\Entity\Menu $menu) {
        $this->menu = $menu;

        return $this;
    }
131440
protected function setMenu(SourceSet $sourceSet)
    {
        // Second loop to set the menu which was initialized during the first loop
        foreach ($sourceSet->updatedSources() as $source) {
            /** @var \Sculpin\Core\Source\FileSource $source */

            if ($source->isGenerated() || !$source->canBeFormatted()) {
                // Skip generated sources.
                // Only takes pages that can be formatted (AKA *.md)
                continue;
            }

            $source->data()->set('menu', $this->menu);
        }
    }
434620
private function buildMenuFromRepository($menuCode)
    {
        $menu = $this
            ->menuRepository
            ->findOneBy([
                'code' => $menuCode,
                'enabled' => true,
            ]);

        if (!($menu instanceof MenuInterface)) {
            throw new Exception(sprintf(
                'Menu "%s" not found',
                $menuCode
            ));
        }

        $this
            ->menuObjectManager
            ->detach($menu);

        return $menu;
    }
1303967
protected static function menuitem_for_controller($controllerClass)
    {
        $urlBase = AdminRootController::admin_url();
        $urlSegment   = Config::inst()->get($controllerClass, 'url_segment');
        $menuPriority = Config::inst()->get($controllerClass, 'menu_priority');
        $ignoreFromMenu = Config::inst()->get($controllerClass, 'ignore_menuitem');

        // Don't add menu items defined the old way, or for controllers that are set to be ignored
        if (!$urlSegment || $ignoreFromMenu) {
            return null;
        }

        $link = Controller::join_links($urlBase, $urlSegment) . '/';

        // doesn't work if called outside of a controller context (e.g. in _config.php)
        // as the locale won't be detected properly. Use {@link LeftAndMain->MainMenu()} to update
        // titles for existing menu entries
        $menuTitle = LeftAndMain::menu_title($controllerClass);

        return new CMSMenuItem($menuTitle, $link, $controllerClass, $menuPriority);
    }
686058
public function setEventList(EventList $eventList)
    {
        $this->_eventList = $eventList;
        $this->_trackEvents = true;

        return $this;
    }
132859
private function applyFiltersToMenuNodes(
        ArrayCollection $menuNodes,
        $menuCode,
        $stage
    ) {
        return $menuNodes->filter(function (NodeInterface $menuNode) use ($menuCode, $stage) {

            if ($this->applyFiltersToMenuNode(
                $menuNode,
                $menuCode,
                $stage
            )
            ) {
                $menuNode->setSubnodes(
                    $this->applyFiltersToMenuNodes(
                        $menuNode->getSubnodes(),
                        $menuCode,
                        $stage
                    )
                );

                return true;
            }

            return false;
        });
    }
545493
public function setMenu(\Amulen\PageBundle\Entity\Menu $menu = null) {
        $this->menu = $menu;

        return $this;
    }
360703
def set_menu(self, menu):
        ''''''
        self.menu = menu
        wx_menu = menu.wx_menu()
        self.frame.SetMenuBar(wx_menu)
        self.frame.Bind(wx.EVT_MENU, self.on_menu)
210652
void setMenuBar (MenuBar menuBar) {
		if (this.menuBar != null && menuBar != null) throw new IllegalStateException("Menu was already added to MenuBar");
		this.menuBar = menuBar;
	}
414377
public void setTableList(java.util.Collection<Table> tableList) {
        if (tableList == null) {
            this.tableList = null;
            return;
        }

        this.tableList = new java.util.ArrayList<Table>(tableList);
    }
229137
public void setSubmenu(List<MenuEntry> submenu) {
		submenu.stream().forEach(entry -> entry.setParent(this));
		this.submenu = submenu;
	}
764586
public function setList(array $list)
    {
        foreach ($list as $item) {
            $this->checkType(TypeDefinitionInterface::class, $item);
        }
        $this->list = $list;
    }
333980
protected function _prepareIconList(array &$iconList) {
		if (empty($iconList) || !is_array($iconList)) {
			return;
		}

		foreach ($iconList as $i => &$iconListItem) {
			if (is_array($iconListItem) && isAssoc($iconListItem)) {
				foreach ($iconListItem as $topMenu => $subMenu) {
					$subMenuList = '';
					foreach ($subMenu as $subMenuItem) {
						$subMenuClass = null;
						if ($subMenuItem === 'divider') {
							$subMenuItem = '';
							$subMenuClass = 'divider';
						}
						$subMenuList .= $this->Html->tag('li', $subMenuItem, ['class' => $subMenuClass]);
					}
					$topMenuItem = $topMenu . $this->Html->tag('ul', $subMenuList, ['class' => 'dropdown-menu']);
				}
				$iconListItem = $topMenuItem;
			}
		}
	}
1321436
public function onMenuChange(Menu $menu) : void
    {
        $this->aliasManager->invalidate(['site_id' => $menu->getSiteId()]);
        $this->aliasCacheLookup->refresh();
    }
810633
public function setMenu(MenuNodeInterface $menu = null)
    {
        $this->menu = $menu;

        if ($menu->getNode() !== $this) {
            $menu->setNode($this);
        }

        return $this;
    }