Set or add available menu.
@param array $menus
351997
public function setMenus($menus)
    {
        $this->_menus = array_merge($this->_menus, $menus);
        $this->_normalizeMenus = null;
    }
1123940
public function setOrder(array $keys) {
        $this->itemsOrdered = [];

        foreach($keys as $label => $value) {
            if($value === 'spacer' || $value === '|') {
                $this->itemsOrdered[] = $this->spacer;
            } elseif(is_array($value)) {
                $parts = explode(',', $label);
                if($this->hasItem($parts[0])) {
                    $dropdown = new DropdownToolbarItem($parts[1]);
                    $dropdown->button = $this->getItem($parts[0]);
                } else {
                    $dropdown = new DropdownToolbarItem($parts[0]);
                }

                foreach($value as $dropdownItem) {
                    $dropdown->addItem($this->getItem($dropdownItem));
                }
                $this->itemsOrdered[] = $dropdown;
            } else {
                $this->itemsOrdered[] = $this->getItem($value);
            }
        }
    }
124785
public function setOptions(array $options)
    {
        if (isset($options['path']) && is_dir($options['path'])) {
            $this->_path = $options['path'];
        }
        if (isset($options['callback']) && is_callable($options['callback'])) {
            $this->_callback = $options['callback'];
        }
    }
44787
public function setTheme($theme, array $mods = [], array $options = [], array $menus = [], array $sidebars = [])
    {
        $this->setOptions($options);
        switch_theme($theme);
        $this->setThemeMods($mods);
        $this->createMenus($menus);
        $this->setupSidebars($sidebars);
    }
994662
public function setCategories($categories)
    {
        foreach ($categories as $key => $name) {
            $this->_categories[$key] = $name;
        }
    }
1072326
public function addTabs(array $tabs): void
	{
		foreach ($tabs as $key => $tab) {
			$this->addTab($key, $tab);
		}
	}
603907
protected function setSettings(array $settings): void
    {
        $this->server->set(array_merge($this->defaultSettings, $this->settings, $settings));
    }
45790
public function addDirs($dirs) {
        if(!is_array($dirs)) {
            $dirs = array($dirs);
        }

        $this->dirs = array_merge($this->dirs, $dirs);
    }
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);
        }
    }
199583
private function configureMenus(array $menus, ContainerBuilder $container)
    {
        if (!$container->hasDefinition('ekyna_admin.menu.pool')) {
            return;
        }

        $pool = $container->getDefinition('ekyna_admin.menu.pool');

        foreach ($menus as $groupName => $groupConfig) {
            $pool->addMethodCall('createGroup', [[
                'name' => $groupName,
                'label' => $groupConfig['label'],
                'icon' => $groupConfig['icon'],
                'position' => $groupConfig['position'],
                'domain' => $groupConfig['domain'],
                'route' => $groupConfig['route'],
            ]]);
            foreach ($groupConfig['entries'] as $entryName => $entryConfig) {
                $pool->addMethodCall('createEntry', [$groupName, [
                    'name' => $entryName,
                    'route' => $entryConfig['route'],
                    'label' => $entryConfig['label'],
                    'resource' => $entryConfig['resource'],
                    'position' => $entryConfig['position'],
                    'domain' => $entryConfig['domain'],
                ]]);
            }
        }
    }
1312784
public function setChildren(array $children)
    {
        if (count(array_filter($children, function($v) {
            return !$v instanceof MenuItemInterface;
        })) > 0) {
            throw new InvalidChildTypeException('Child items has to implement ' . MenuItemInterface::class);
        }

        $this->children = $children;
    }
295004
private function setRoutes(array $routes)
    {
        $this->routes = [];

        foreach ($routes as $name => $route) {
            $this->add($name, $route);
        }
    }
198750
public function setOrganizations(array $organizations)
    {
        $this->hasOrganizationsProperty();

        $this->organizations = $organizations instanceof ArrayCollection ?
            $organizations :
            new ArrayCollection($organizations);
    }
810633
public function setMenu(MenuNodeInterface $menu = null)
    {
        $this->menu = $menu;

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

        return $this;
    }
128276
def set_menu_actions(self, menu_actions):
        """"""
        if self.menu_actions is not None:
            add_actions(self.menu, self.menu_actions)
778827
public function addOptions(array $options): void
	{
		foreach ($options as $key => $option) {
			$this->addOption($key, $option);
		}
	}
413435
public function setSources(array $sources)
    {
        $parameters = $this
            ->configuration
            ->getParameters();
        $parameters['sources'] = $sources;

        $this
            ->configuration
            ->setParameters($parameters);
    }