List all enabled plugins, installed and recommend packages.
@return string
179146
public function index()
    {
        $this->requireAdmin();

        $json = $this->getComposerJson();
        $this->view->installedPackages = $json['require'];

        $pluginInfo = new PluginInformationCollection();
        $pluginInfo->add(FilesPluginInformation::newFromDir(
            PHPCI_DIR . "PHPCI/Plugin/"
        ));
        $pluginInfo->add(ComposerPluginInformation::buildFromYaml(
            PHPCI_DIR . "vendor/composer/installed.json"
        ));

        $this->view->plugins = $pluginInfo->getInstalledPlugins();

        $this->layout->title = Lang::get('plugins');

        return $this->view->render();
    }
902943
public static List<String> getInstalledPlugins() {
        final List<Element> plugins = toList(getPluginConfiguration().getElementsByTagName("plugin"));
        return plugins.stream()
                .map((Element elem) -> elem.getAttributeNode("id"))
                .filter(Objects::nonNull)
                .map(Attr::getValue)
                .sorted()
                .collect(Collectors.toList());
    }
1332910
public function getPluginsBundledWithPiwik()
    {
        $pathGlobal = $this->settings->getPathGlobal();

        $section = $this->settings->getIniFileChain()->getFrom($pathGlobal, 'Plugins');
        return $section['Plugins'];
    }
231764
protected function getAllModules()
    {
        return $this->extensionManager->discoverModules()
                    ->showInstalled()
                    ->showUninstalled()
                    ->showNoCore()
                    ->showCore()
                    ->getList(true);
    }
387046
private function get_all_plugin_names() {
		$names = array();
		foreach ( get_plugins() as $file => $details ) {
			$names[] = Utils\get_plugin_name( $file );
		}

		return $names;
	}
824364
private function get_current_plugins() {
		$updates_avail = get_site_transient( 'update_plugins' );

		$msg = '';
		foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
			$plugin_data = get_plugin_data( $plugin );

			$plugin_file = str_replace( trailingslashit( WP_PLUGIN_DIR ), '', $plugin );

			if ( isset( $updates_avail->response[ $plugin_file ] ) ) {
				$msg .= '<i class="icon-close1"></i> ';
			}
			$msg .= '<a href="' . $plugin_data['PluginURI'] . '">' . $plugin_data['Name'] . '</a> v' . $plugin_data['Version'] . '<br/>';
		}

		return $msg;
	}
1135931
private static function getPresetsInfo() {
    $installation_types = self::getInstallationTypes(TRUE);
    $presets_info = [];
    $packages_info = self::getPackages();

    foreach ($installation_types as $preset => $preset_info) {
      $presets_info[$preset] = $preset_info;
      $presets_info[$preset]['packages_expanded'] = [];
      foreach ($preset_info['packages'] as $package) {
        if (empty($packages_info[$package])) {
          continue;
        }
        $presets_info[$preset]['packages_expanded'][$package] = $packages_info[$package];
        if (!isset($packages_info[$package]['usage'])) {
          $packages_info[$package]['usage'] = 0;
        }
        $packages_info[$package]['usage']++;
      }
    }

    return $presets_info;
  }
815466
public static function getAvailablePackages()
	{
		$availablePackages = self::getRemotePackages();
		$localPackages = self::getLocalPackages();
		foreach ($localPackages as $installedPackage)
		{
			unset($availablePackages[$installedPackage->getName()]);
		}
		return $availablePackages;
	}
980563
public static function get_enabled_plugins() {
        global $CFG;

        $order = (!empty($CFG->converter_plugins_sortorder)) ? explode(',', $CFG->converter_plugins_sortorder) : [];
        if ($order) {
            $plugins = \core_plugin_manager::instance()->get_installed_plugins('fileconverter');
            $order = array_intersect($order, array_keys($plugins));
        }

        return array_combine($order, $order);
    }
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'];
    }
831032
public function listAvailableSiteWidePlugins()
    {
        $plugins = $this->getSiteWidePlugins();

        $list = [];

        if (empty($plugins)) {
            return $list;
        }

        /** @var \Rcm\Entity\PluginInstance $plugin */
        foreach ($plugins as $plugin) {
            $list[$plugin->getDisplayName()] = [
                'displayName' => $plugin->getDisplayName(),
                'icon' => $plugin->getIcon(),
                'siteWide' => true, // @deprecated <deprecated-site-wide-plugin>
                'name' => $plugin->getPlugin(),
                'instanceId' => $plugin->getInstanceId()
            ];
        }

        return $list;
    }
217723
public function getInstalledPackages()
    {
        $packages = [];

        $content = $this->getFileContents('composer.lock');

        foreach (['packages', 'packages-dev'] as $key) {
            if (!isset($content[$key])) {
                continue;
            }

            foreach ($content[$key] as $package) {
                $name = $package['name'];

                $packages[$name] = [
                    'name' => $name,
                    'version' => $package['version'],
                    'devDependency' => $key === 'packages-dev',
                ];
            }
        }

        if (empty($packages)) {
            throw new LogicException('We couldn\'t find any installed packages.');
        }

        return $packages;
    }
535911
private static function get_enabled() {
        global $CFG;

        $active = array();
        if (empty($CFG->antiviruses)) {
            return $active;
        }

        foreach (explode(',', $CFG->antiviruses) as $e) {
            if ($antivirus = self::get_antivirus($e)) {
                if ($antivirus->is_configured()) {
                    $active[$e] = $antivirus;
                }
            }
        }
        return $active;
    }
350648
def list_installed():
    '''
    
    '''
    pkg_re = re.compile(r'^{0}-[\d.-]+-{1}$'.format(
        _package_prefix(), _kernel_type()))
    pkgs = __salt__['pkg.list_pkgs'](versions_as_list=True)
    if pkgs is None:
        pkgs = []

    result = list(filter(pkg_re.match, pkgs))
    if result is None:
        return []

    prefix_len = len(_package_prefix()) + 1

    if six.PY2:
        return sorted([pkg[prefix_len:] for pkg in result], cmp=_cmp_version)
    else:
        return sorted([pkg[prefix_len:] for pkg in result], key=functools.cmp_to_key(_cmp_version))
1118874
public static function getOfficialPlugins()
    {
        $plugins = [];

        // Get the official list from the website
        $content = json_decode(AdminUtils::getContent('http://featherbb.org/plugins.json'));

        // If internet is available
        if (!is_null($content)) {
            foreach ($content as $plugin) {
                // Get information from each repo
                // TODO: cache
                $plugins[] = json_decode(
                    AdminUtils::getContent(
                        'https://raw.githubusercontent.com/featherbb/'.$plugin.'/master/featherbb.json'
                    )
                );
            }
        }

        return $plugins;
    }
1318290
public function index()
    {
        Session::forget('install-module');

        $result = [];
        foreach ($this->extensions as $ext) {
            if (extension_loaded($ext)) {
                $result [$ext] = 'true';
            } else {
                $result [$ext] = false;
            }
        }

        return view('avored-install::install.extension')->with('result', $result);
    }
943632
public function getActiveViewPlugins()
    {
        $ret = $this->_getSetting('plugins');
        $d = $this->getData();
        if ($d->isPage) {
            while ($d) {
                foreach (Kwc_Abstract::getSetting($d->componentClass, 'pluginsInherit') as $i) {
                    if (!in_array($i, $ret)) $ret[] = $i;
                }
                $d = $d->parent;
            }
        }
        return $ret;
    }