Returns a list of available plugin menu instances.

@return \Piwik\Plugin\Menu[]
354072
protected function getAllMenus()
    {
        if (!empty(self::$menus)) {
            return self::$menus;
        }

        $components = PluginManager::getInstance()->findComponents('Menu', 'Piwik\\Plugin\\Menu');

        self::$menus = array();
        foreach ($components as $component) {
            self::$menus[] = StaticContainer::get($component);
        }

        return self::$menus;
    }
910960
public function getInternalPlugins()
    {
        // Return only plugins with no custom url
        $plugins = [];
        foreach ($this->getPlugins() as $name => $url) {
            if (empty($url)) {
                $plugins[] = $name;
            }
        }
        return $plugins;
    }
939196
public function getPluginClassNames() {
		$plugins = array();
		if (TRUE === $this->isEnabled('NamelessCoder\\GizzleGitPlugins\\GizzlePlugins\\ClonePlugin')) {
			$plugins[] = 'NamelessCoder\\GizzleGitPlugins\\GizzlePlugins\\ClonePlugin';
		}
		if (TRUE === $this->isEnabled('NamelessCoder\\GizzleGitPlugins\\GizzlePlugins\\CheckoutPlugin')) {
			$plugins[] = 'NamelessCoder\\GizzleGitPlugins\\GizzlePlugins\\CheckoutPlugin';
		}
		if (TRUE === $this->isEnabled('NamelessCoder\\GizzleGitPlugins\\GizzlePlugins\\PullPlugin')) {
			$plugins[] = 'NamelessCoder\\GizzleGitPlugins\\GizzlePlugins\\PullPlugin';
		}
		if (TRUE === $this->isEnabled('NamelessCoder\\GizzleGitPlugins\\GizzlePlugins\\CommitPlugin')) {
			$plugins[] = 'NamelessCoder\\GizzleGitPlugins\\GizzlePlugins\\CommitPlugin';
		}
		if (TRUE === $this->isEnabled('NamelessCoder\\GizzleGitPlugins\\GizzlePlugins\\PushPlugin')) {
			$plugins[] = 'NamelessCoder\\GizzleGitPlugins\\GizzlePlugins\\PushPlugin';
		}
		return $plugins;
	}
251279
protected function getMenuMethods($plugin)
    {
        //Gets all methods from `$PLUGIN\View\Helper\MenuHelper`
        $methods = get_child_methods(sprintf('\%s\View\Helper\MenuHelper', $plugin));

        //Filters invalid name methods and returns
        return $methods ? array_values(preg_grep('/^(?!_).+$/', $methods)) : [];
    }
387046
private function get_all_plugin_names() {
		$names = array();
		foreach ( get_plugins() as $file => $details ) {
			$names[] = Utils\get_plugin_name( $file );
		}

		return $names;
	}
1275707
public function getActionPlugins()
    {
        if (null === $this->actionPlugins) {
            $this->setActionPlugins(new Action\PluginManager());
        }
        return $this->actionPlugins;
    }
806914
public function getPluginNames() {
    $definitions = $this->getDefinitions();
    $plugin_names = [];

    foreach ($definitions as $definition) {
      $name = $definition['name']->getUntranslatedString();
      $plugin_names[$definition['id']] = $name;
    }

    return $plugin_names;
  }
1300579
protected static function pluginsWithTemplates(): array
    {
        $plugins = Plugin::loaded();

        array_walk($plugins, function ($plugin, $index) use (&$plugins) {
            $paths = App::path('Template', $plugin);

            array_walk($paths, function ($path, $index) use (&$paths) {
                if (!is_dir($path)) {
                    unset($paths[$index]);
                }
            });
        });

        return $plugins;
    }
433775
public static function getMenuLinks($menuSlug)
    {
        // Set active MenuLinks
        MenuLink::setActiveIDs(true);

        $menuData = self::findBySlug($menuSlug);
        $menuLinks = MenuLink::where('menuID', $menuData->menuID)->orderBy('order')->get();

        if($menuLinks) {
            return MenuLink::children($menuLinks);
        }
    }
732104
public function componentsList()
    {
        $function = function () {

            $widgets = app('antares.widget')->make('menu.top.right')->items();

            if (!isset($widgets["ui-components-selector"])) {
                return [];
            }
            $childs = $widgets["ui-components-selector"]->childs;
            if (empty($childs)) {
                return [];
            }
            $disabled = Registry::get('ui-components.disabled');
            $viewed   = Registry::get('ui-components.viewed');

            foreach ($childs as $index => $child) {
                $classname = array_get($child->attributes, 'classname');
                if (!is_null($viewed) and ! $viewed->contains($classname)) {
                    unset($childs[$index]);
                }
                if (!is_null($disabled) and $disabled->contains($classname)) {
                    unset($childs[$index]);
                }
            }
            return $childs;
        };
        return new Twig_SimpleFunction(
                'components_list', $function
        );
    }
339051
public function getPlugins(){
        $config = [];
        $registry = self::getRegistry();

        if ($registry->isRegistered(self::CREATOR)) {
            $config = $registry->get(self::CREATOR);
        }

        if (!isset($config['plugins'])) {
            return [];
        }

        return $config['plugins'];
    }
516222
public static function get_component_names() : array {
        $componentnames = [];
        // Get all plugins.
        foreach (self::get_plugin_types() as $plugintype => $typedir) {
            foreach (self::get_plugin_list($plugintype) as $pluginname => $plugindir) {
                $componentnames[] = $plugintype . '_' . $pluginname;
            }
        }
        // Get all subsystems.
        foreach (self::get_core_subsystems() as $subsystemname => $subsystempath) {
            $componentnames[] = 'core_' . $subsystemname;
        }
        return $componentnames;
    }
211164
public function getMenus()
    {
        $this->menus || $this->menus = wei()->menu()->notDeleted()->findAll(['categoryId' => $this['id']]);

        return $this->menus;
    }
643609
public function getPlugins()
    {
        if ($this->_plugins === null) {
            $plugins = [];
            foreach ($this->getConfig() as $pointer => $fields) {
                if (is_array($fields)) {
                    foreach ($fields as $field) {
                        if (isset($field['type'])) {
                            $fieldName = $field['name'];
                            if (!array_key_exists($fieldName, $plugins)) {
                                $plugins[$fieldName] = $field;
                            }
                        }
                    }
                }
            }
            $this->_plugins = $plugins;
        }

        return $this->_plugins;
    }
953458
public static function get_all_locations() {
		$menus = [];

		$locations = get_nav_menu_locations();

		foreach ( $locations as $location => $menu_id ) {
			$menus[ $location ] = [];

			$menu_items = wp_get_nav_menu_items( $menu_id );
			$menu_items = is_array( $menu_items ) ? $menu_items : [];

			foreach ( $menu_items as $menu_item ) {
				if ( ! $menu_item->menu_item_parent ) {
					$items = [
						'title' => $menu_item->title,
						'link' => str_replace( site_url(), '', $menu_item->url ),
						'items' => self::get_sub_menu_items( $menu_items, $menu_item->ID ),
					];
					$menus[ $location ][] = apply_filters( "menu_$location", $items );
				}
			}
		}

		return $menus;
	}
539338
public function plugins()
    {
        // plugins is a list of arrays, activate on a per plugin base
        if (is_array($this->plugins)) {
            return $this->plugins;
        }

        // for anything the evaluates to true, activate all plugins
        if ($this->plugins) {
            $plugins = apply_filters('all_plugins', get_plugins());

            return array_keys($plugins);
        }

        return [];
    }
800668
public function getTopChildren()
    {
        if (is_null($this->topMenuItems)) {
            /* @var $request Request */
            $request = $this->container->get('request_stack')->getCurrentRequest();
            $this->topMenuItems = array();
            foreach ($this->getAdaptors() as $menuAdaptor) {
                $menuAdaptor->adaptChildren($this, $this->topMenuItems, null, $request);
            }
        }

        return $this->topMenuItems;
    }