public function loadAllPluginsAndGetTheirInfo()
    {
        /** @var Translator $translator */
        $translator = StaticContainer::get('Piwik\Translation\Translator');

        $plugins = array();

        $listPlugins = array_merge(
            $this->readPluginsDirectory(),
            $this->pluginList->getActivatedPlugins()
        );
        $listPlugins = array_unique($listPlugins);
        $internetFeaturesEnabled = SettingsPiwik::isInternetEnabled();
        foreach ($listPlugins as $pluginName) {
            // Hide plugins that are never going to be used
            if ($this->isPluginBogus($pluginName)) {
                continue;
            }

            // If the plugin is not core and looks bogus, do not load
            if ($this->isPluginThirdPartyAndBogus($pluginName)) {
                $info = array(
                    'invalid'         => true,
                    'activated'       => false,
                    'alwaysActivated' => false,
                    'uninstallable'   => true,
                );
            } else {
                $translator->addDirectory(self::getPluginDirectory($pluginName) . '/lang');
                $this->loadPlugin($pluginName);
                $info = array(
                    'activated'       => $this->isPluginActivated($pluginName),
                    'alwaysActivated' => $this->isPluginAlwaysActivated($pluginName),
                    'uninstallable'   => $this->isPluginUninstallable($pluginName),
                );
            }

            $plugins[$pluginName] = $info;
        }

        $loadedPlugins = $this->getLoadedPlugins();
        foreach ($loadedPlugins as $oPlugin) {
            $pluginName = $oPlugin->getPluginName();

            $info = array(
                'info' => $oPlugin->getInformation(),
                'activated'       => $this->isPluginActivated($pluginName),
                'alwaysActivated' => $this->isPluginAlwaysActivated($pluginName),
                'missingRequirements' => $oPlugin->getMissingDependenciesAsString(),
                'uninstallable' => $this->isPluginUninstallable($pluginName),
            );
            $plugins[$pluginName] = $info;
        }

        return $plugins;
    }
public function loadAllPluginsAndGetTheirInfo()
    {
        /** @var Translator $translator */
        $translator = StaticContainer::get('Piwik\Translation\Translator');

        $plugins = array();

        $listPlugins = array_merge(
            $this->readPluginsDirectory(),
            $this->pluginList->getActivatedPlugins()
        );
        $listPlugins = array_unique($listPlugins);
        $internetFeaturesEnabled = SettingsPiwik::isInternetEnabled();
        foreach ($listPlugins as $pluginName) {
            // Hide plugins that are never going to be used
            if ($this->isPluginBogus($pluginName)) {
                continue;
            }

            // If the plugin is not core and looks bogus, do not load
            if ($this->isPluginThirdPartyAndBogus($pluginName)) {
                $info = array(
                    'invalid'         => true,
                    'activated'       => false,
                    'alwaysActivated' => false,
                    'uninstallable'   => true,
                );
            } else {
                $translator->addDirectory(self::getPluginDirectory($pluginName) . '/lang');
                $this->loadPlugin($pluginName);
                $info = array(
                    'activated'       => $this->isPluginActivated($pluginName),
                    'alwaysActivated' => $this->isPluginAlwaysActivated($pluginName),
                    'uninstallable'   => $this->isPluginUninstallable($pluginName),
                );
            }

            $plugins[$pluginName] = $info;
        }

        $loadedPlugins = $this->getLoadedPlugins();
        foreach ($loadedPlugins as $oPlugin) {
            $pluginName = $oPlugin->getPluginName();

            $info = array(
                'info' => $oPlugin->getInformation(),
                'activated'       => $this->isPluginActivated($pluginName),
                'alwaysActivated' => $this->isPluginAlwaysActivated($pluginName),
                'missingRequirements' => $oPlugin->getMissingDependenciesAsString(),
                'uninstallable' => $this->isPluginUninstallable($pluginName),
            );
            $plugins[$pluginName] = $info;
        }

        return $plugins;
    }
public function loadAllPluginsAndGetTheirInfo ( ) { /** @var Translator $translator */ $ translator = StaticContainer :: get ( 'Piwik\Translation\Translator' ) ; $ plugins = array ( ) ; $ listPlugins = array_merge ( $ this -> readPluginsDirectory ( ) , $ this -> pluginList -> getActivatedPlugins ( ) ) ; $ listPlugins = array_unique ( $ listPlugins ) ; $ internetFeaturesEnabled = SettingsPiwik :: isInternetEnabled ( ) ; foreach ( $ listPlugins as $ pluginName ) { // Hide plugins that are never going to be used if ( $ this -> isPluginBogus ( $ pluginName ) ) { continue ; } // If the plugin is not core and looks bogus, do not load if ( $ this -> isPluginThirdPartyAndBogus ( $ pluginName ) ) { $ info = array ( 'invalid' => true , 'activated' => false , 'alwaysActivated' => false , 'uninstallable' => true , ) ; } else { $ translator -> addDirectory ( self :: getPluginDirectory ( $ pluginName ) . '/lang' ) ; $ this -> loadPlugin ( $ pluginName ) ; $ info = array ( 'activated' => $ this -> isPluginActivated ( $ pluginName ) , 'alwaysActivated' => $ this -> isPluginAlwaysActivated ( $ pluginName ) , 'uninstallable' => $ this -> isPluginUninstallable ( $ pluginName ) , ) ; } $ plugins [ $ pluginName ] = $ info ; } $ loadedPlugins = $ this -> getLoadedPlugins ( ) ; foreach ( $ loadedPlugins as $ oPlugin ) { $ pluginName = $ oPlugin -> getPluginName ( ) ; $ info = array ( 'info' => $ oPlugin -> getInformation ( ) , 'activated' => $ this -> isPluginActivated ( $ pluginName ) , 'alwaysActivated' => $ this -> isPluginAlwaysActivated ( $ pluginName ) , 'missingRequirements' => $ oPlugin -> getMissingDependenciesAsString ( ) , 'uninstallable' => $ this -> isPluginUninstallable ( $ pluginName ) , ) ; $ plugins [ $ pluginName ] = $ info ; } return $ plugins ; }
Returns info regarding all plugins. Loads plugins that can be loaded.

@return array An array that maps plugin names with arrays of plugin information. Plugin
information consists of the following entries:

- **activated**: Whether the plugin is activated.
- **alwaysActivated**: Whether the plugin should always be activated,
or not.
- **uninstallable**: Whether the plugin is uninstallable or not.
- **invalid**: If the plugin is invalid, this property will be set to true.
If the plugin is not invalid, this property will not exist.
- **info**: If the plugin was loaded, will hold the plugin information.
See {@link Piwik\Plugin::getInformation()}.
@api
Returns info regarding all plugins . Loads plugins that can be loaded .