Returns localised list of available plugin types

@return array (string)plugintype => (string)plugin name
187107
public function get_plugin_types_menu() {
        global $CFG;

        $pluginman = core_plugin_manager::instance();

        $menu = array('' => get_string('choosedots'));
        foreach (array_keys($pluginman->get_plugin_types()) as $plugintype) {
            $menu[$plugintype] = $pluginman->plugintype_name($plugintype).' ('.$plugintype.')';
        }

        return $menu;
    }
927367
public static function getAllPlugins()
    {
        static $pluginsWithTranslations;

        if (!empty($pluginsWithTranslations)) {
            return $pluginsWithTranslations;
        }

        $pluginsWithTranslations = array();
        foreach (Manager::getPluginsDirectories() as $pluginsDir) {
            $pluginsWithTranslations = array_merge($pluginsWithTranslations, glob(sprintf('%s*/lang/en.json', $pluginsDir)));
        }
        $pluginsWithTranslations = array_map(function ($elem) {
            $replace = Manager::getPluginsDirectories();
            $replace[] = '/lang/en.json';
            return str_replace($replace, '', $elem);
        }, $pluginsWithTranslations);

        return $pluginsWithTranslations;
    }
332591
public static function getAvailableLanguages(){
        $languages = array();
        foreach(common_ext_ExtensionsManager::singleton()->getInstalledExtensions() as $extension){
           $localesDir = $extension->getDir() . 'locales/';
           foreach(glob($localesDir . '*') as  $file){
                if(is_dir($file) && file_exists($file . '/messages.po')){
                    $lang = basename($file);
                    if(!in_array($lang, $languages)){
                        $languages[] = $lang;
                    }
                }
           }
        } 
        return $languages;
    }
969222
public static function getAvailableTypes()
    {
        return [
            self::TYPE_STRING,
            self::TYPE_INTEGER,
            self::TYPE_FLOAT,
            self::TYPE_BOOLEAN,
            self::TYPE_DATETIME,
        ];
    }
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;
  }
1001010
public static function list_components() {

        $list['moodle'] = 'core';

        $coresubsystems = core_component::get_core_subsystems();
        ksort($coresubsystems); // should be but just in case
        foreach ($coresubsystems as $name => $location) {
            $list[$name] = 'core_'.$name;
        }

        $plugintypes = core_component::get_plugin_types();
        foreach ($plugintypes as $type => $location) {
            $pluginlist = core_component::get_plugin_list($type);
            foreach ($pluginlist as $name => $ununsed) {
                if ($type == 'mod') {
                    // Plugin names are now automatically validated.
                    $list[$name] = $type.'_'.$name;
                } else {
                    $list[$type.'_'.$name] = $type.'_'.$name;
                }
            }
        }

        return $list;
    }
136927
public static function get_enabled_plugins() {
        $plugins = core_plugin_manager::instance()->get_installed_plugins('qbehaviour');
        if (!$plugins) {
            return array();
        }
        if ($disabled = get_config('question', 'disabledbehaviours')) {
            $disabled = explode(',', $disabled);
        } else {
            $disabled = array();
        }

        $enabled = array();
        foreach ($plugins as $plugin => $version) {
            if (in_array($plugin, $disabled)) {
                continue;
            }
            $enabled[$plugin] = $plugin;
        }

        return $enabled;
    }
1325235
public function getPlugins()
    {
        if ($this->noRequire) {
            return [];
        }
        $res = [
            'hiqdev/hidev-php' => 'dev-master',
        ];
        if ($this->vendorRequire) {
            $res[$this->vendorRequire] = 'dev-master';
        }

        return $res;
    }
996414
public function getSupportedLocales()
    {
        $return = [];
        $process = new Process(['locale', '-a']);
        $process->run();
        $installedLocales = explode(PHP_EOL, trim($process->getOutput()));
        foreach ($this->supportedLocales as $supportedLocale) {
            if (in_array($supportedLocale, $installedLocales)
                || in_array($supportedLocale.'.utf8', $installedLocales)
            ) {
                $return[] = new Locale($supportedLocale);
            }
        }

        return $return;
    }
664099
public static function getTypes() {
        return array(
            self::TYPE_CHARACTER,
            self::TYPE_LOGICAL,
            self::TYPE_DATE ,
            self::TYPE_NUMERIC,
            self::TYPE_MEMO,
        );
    }
739249
public function getPluginNamespaces()
    {
        $classNames = [];

        foreach ($this->getVendorAndPluginNames() as $vendorName => $vendorList) {
            foreach ($vendorList as $pluginName => $pluginPath) {
                $namespace = '\\'.$vendorName.'\\'.$pluginName;
                $namespace = Str::normalizeClassName($namespace);
                $classNames[$namespace] = $pluginPath;
            }
        }

        return $classNames;
    }
1153375
public function getPlugins()
    {
        if (!$this->_plugins) {

            $manifest = $this->getPluginPath() . '/composer.json';

            if (!file_exists($manifest)) {
                return array();
            }

            $contents = file_get_contents($manifest);

            if ($contents === false) {
                return array();
            }

            $data = json_decode($contents);

            if (!isset($data->require)) {
                return array();
            }

            $this->_plugins = array();

            foreach ($data->require as $package => $version)
            {
                $file = $this->getPluginPath() . '/vendor/' . $package . '/composer.json';

                if (file_exists($file))
                {
                    $json     = file_get_contents($file);
                    $manifest = json_decode($json);

                    if (is_null($manifest)) {
                        continue;
                    }

                    if (isset($manifest->type) && $manifest->type == 'joomlatools-console-plugin') {
                        $this->_plugins[$package] = $version;
                    }
                }
            }
        }

        return $this->_plugins;
    }
1213591
public function getAvailableLanguages()
    {
        if (!is_null($this->languageNames)) {
            return $this->languageNames;
        }
        $path = PIWIK_INCLUDE_PATH . "/lang/";
        $languagesPath = _glob($path . "*.json");

        $pathLength = strlen($path);
        $languages = array();
        if ($languagesPath) {
            foreach ($languagesPath as $language) {
                $languages[] = substr($language, $pathLength, -strlen('.json'));
            }
        }

        $this->enableDevelopmentLanguageInDevEnvironment($languages);

        /**
         * Hook called after loading available language files.
         *
         * Use this hook to customise the list of languagesPath available in Matomo.
         *
         * @param array
         */
        Piwik::postEvent('LanguagesManager.getAvailableLanguages', array(&$languages));

        /**
         * Hook called after loading available language files.
         *
         * @param array
         *
         * @deprecated since v3.9.0 use LanguagesManager.getAvailableLanguages instead. Will be removed in Matomo 4.0.0
         */
        Piwik::postEvent('LanguageManager.getAvailableLanguages', array(&$languages));

        $this->languageNames = $languages;
        return $languages;
    }
908988
public function getPluginActivities() {
		$activities = $this->getActivities();

		if ( ! isset( $activities[ $this->plugin ] ) ) {
			$activities[ $this->plugin ] = array();
		}

		return $activities[ $this->plugin ];
	}
301693
private function getExistingPlugins()
    {
        $pluginsIndexed = [];
        $plugins = $this
            ->pluginRepository
            ->findAll();

        /**
         * @var Plugin $plugin
         */
        foreach ($plugins as $plugin) {
            $pluginNamespace = $plugin->getNamespace();
            $pluginsIndexed[$pluginNamespace] = $plugin;
        }

        return $pluginsIndexed;
    }
952572
public function getTypeOptions()
    {
        $sLangPath = 'lovata.toolbox::lang.type.';

        return [
            self::TYPE_INPUT           => Lang::get($sLangPath.self::TYPE_INPUT),
            self::TYPE_NUMBER          => Lang::get($sLangPath.self::TYPE_NUMBER),
            self::TYPE_TEXT_AREA       => Lang::get($sLangPath.self::TYPE_TEXT_AREA),
            self::TYPE_RICH_EDITOR     => Lang::get($sLangPath.self::TYPE_RICH_EDITOR),
            self::TYPE_SINGLE_CHECKBOX => Lang::get($sLangPath.self::TYPE_SINGLE_CHECKBOX),
            self::TYPE_SWITCH          => Lang::get($sLangPath.self::TYPE_SWITCH),
            self::TYPE_CHECKBOX        => Lang::get($sLangPath.self::TYPE_CHECKBOX),
            self::TYPE_TAG_LIST        => Lang::get($sLangPath.self::TYPE_TAG_LIST),
            self::TYPE_SELECT          => Lang::get($sLangPath.self::TYPE_SELECT),
            self::TYPE_RADIO           => Lang::get($sLangPath.self::TYPE_RADIO),
            self::TYPE_BALLOON         => Lang::get($sLangPath.self::TYPE_BALLOON),
            self::TYPE_DATE            => Lang::get($sLangPath.self::TYPE_DATE),
            self::TYPE_COLOR_PICKER    => Lang::get($sLangPath.self::TYPE_COLOR_PICKER),
            self::TYPE_MEDIA_FINDER    => Lang::get($sLangPath.self::TYPE_MEDIA_FINDER),
        ];
    }
387046
private function get_all_plugin_names() {
		$names = array();
		foreach ( get_plugins() as $file => $details ) {
			$names[] = Utils\get_plugin_name( $file );
		}

		return $names;
	}