Load installed plugin bundles and return an array with them, indexed by
their namespaces.

@return \Symfony\Component\HttpKernel\Bundle\Bundle[] Plugins installed
18182
protected function getInstalledPluginBundles(\Symfony\Component\HttpKernel\KernelInterface $kernel)
    {
        $plugins = [];
        $bundles = $kernel->getBundles();

        foreach ($bundles as $bundle) {
            if (
                $bundle instanceof \Symfony\Component\HttpKernel\Bundle\Bundle &&
                $bundle instanceof \Elcodi\Component\Plugin\Interfaces\PluginInterface
            ) {
                $pluginNamespace = $bundle->getNamespace();
                $plugins[$pluginNamespace] = $bundle;
            }
        }

        return $plugins;
    }
633741
public function getPluginClasses()
    {
        $arr = array();

        foreach ($this->pluginInformations as $single) {
            $arr = array_merge($arr, $single->getPluginClasses());
        }

        return $arr;
    }
918
def load_installed_plugins():
        """"""
        providers = {}
        checkers = {}
        for entry_point in pkg_resources.iter_entry_points(group='archan'):
            obj = entry_point.load()
            if issubclass(obj, Provider):
                providers[entry_point.name] = obj
            elif issubclass(obj, Checker):
                checkers[entry_point.name] = obj
        return collections.namedtuple(
            'Plugins', 'providers checkers')(
                providers=providers,
                checkers=checkers)
1089722
public function getAllBundles() {
		if($this->bundles === null)
			$this->bundles = $this->doGetBundles();
		return $this->bundles;
	}
1363955
protected static function getFiles()
    {
        $files = [];
        //
        foreach (glob(Application::$root.'plugins/*') as  $value) {
            $files[] = $value;
        }
        //
        return $files;
    }
405281
public function load(array $bundles)
    {
        $this->finalBundles = $bundles;

        while (!empty($this->bundleStack)) {
            $bundle = array_shift($this->bundleStack);
            $this->addBundle($bundle);
        }

        return $this->finalBundles;
    }
825377
protected function collectPlugins() {
		$plugins = Configure::read('plugins');

		$names = array_keys($plugins);

		sort($names);

		return $names;
	}
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;
    }
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;
    }
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'];
    }
469483
protected function getInstalledPluginNamespaces()
    {
        $cache_item = $this->cache->getItem('plugins.installed');

        $project_root = ProjectX::projectRoot();
        $installed_file = "$project_root/vendor/composer/installed.json";

        if (!$cache_item->isHit()
            && file_exists($installed_file)) {
            $installed = json_decode(
                file_get_contents($installed_file),
                true
            );
            $namespaces = [];

            foreach ($installed as $info) {
                if (empty($info['autoload']) ||
                    $info['type'] !== 'project-x') {
                    continue;
                }

                if (isset($info['autoload']['psr-4'])) {
                    $namespaces[$info['name']] = key($info['autoload']['psr-4']);
                }
            }

            if (!empty($namespaces)) {
                $cache_item
                    ->set($namespaces)
                    ->expiresAfter(3600);

                $this->cache->save($cache_item);
            }
        }

        return $cache_item->get() ?: [];
    }
120017
protected function _loadPlugins()
    {
        $autoloader = $this->getPluginPath() . '/vendor/autoload.php';

        if (file_exists($autoloader)) {
            require_once $autoloader;
        }

        $plugins = $this->getPlugins();

        $classes = array();
        foreach ($plugins as $package => $version)
        {
            $path        = $this->getPluginPath() . '/vendor/' . $package;
            $directories = glob($path.'/*/Console/Command', GLOB_ONLYDIR);

            foreach ($directories as $directory)
            {
                $vendor   = substr($directory, strlen($path) + 1, strlen('/Console/Command') * -1);
                $iterator = new \DirectoryIterator($directory);

                foreach ($iterator as $file)
                {
                    if ($file->getExtension() == 'php') {
                        $classes[] = sprintf('%s\Console\Command\%s', $vendor, $file->getBasename('.php'));
                    }
                }
            }
        }

        foreach ($classes as $class)
        {
            if (class_exists($class))
            {
                $command = new $class();

                if (!$command instanceof \Symfony\Component\Console\Command\Command) {
                    continue;
                }

                $name = $command->getName();

                if(!$this->has($name)) {
                    $this->add($command);
                }
                else $this->_output->writeln("<fg=yellow;options=bold>Notice:</fg=yellow;options=bold> The '$class' command wants to register the '$name' command but it already exists, ignoring.");
            }
        }
    }
25003
private function loadPackageDescriptors()
    {
        $descriptors = [];
        try {
            /** @var JsonFile $autoload */
            $autoload = $this->extFs->get('vendor/autoload.json');
        } catch (FileNotFoundException $e) {
            return $descriptors;
        }

        // Get extensions we're managing via the autoloader
        foreach ((array) $autoload->parse() as $name => $loader) {
            $descriptors[$name] = PackageDescriptor::create($loader);
        }

        return $descriptors;
    }
910508
public static function getBundles(): array
    {
        // Dependencies
        return [
            // Required by SidusEAVBootstrapBundle
            new \Mopa\Bundle\BootstrapBundle\MopaBootstrapBundle(),
            // Required by SidusFilterBundle
            new \WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
            // Required by SidusEAVBootstrapBundle
            new \Pinano\Select2Bundle\PinanoSelect2Bundle(),
            // Required by SidusFileUploadBundle
            new \Oneup\UploaderBundle\OneupUploaderBundle(),
            // Required by SidusFileUploadBundle
            new \Oneup\FlysystemBundle\OneupFlysystemBundle(),

            // Sidus bundles
            // Base bundle containing many dependencies
            new \Sidus\BaseBundle\SidusBaseBundle(),
            // Base bundle for EAV model
            new \Sidus\EAVModelBundle\SidusEAVModelBundle(),
            // Data filtering based on user input
            new \Sidus\FilterBundle\SidusFilterBundle(),
            // Data filtering with EAV support
            new \Sidus\EAVFilterBundle\SidusEAVFilterBundle(),
            // Bootstrap integration + additional EAV components
            new \Sidus\EAVBootstrapBundle\SidusEAVBootstrapBundle(),
            // DataGrid made easy
            new \Sidus\DataGridBundle\SidusDataGridBundle(),
            // Easily attach file to doctrine's entities
            new \Sidus\FileUploadBundle\SidusFileUploadBundle(),
            // Very basic admin configuration in YML to regroup entities and route actions easily
            new \Sidus\AdminBundle\SidusAdminBundle(),

            // Additionnal Bundles
            // TinyMCE WYSIWYG integration
            new \Stfalcon\Bundle\TinymceBundle\StfalconTinymceBundle(),
            // JS routing needed for TinyMCE extensions
            new \FOS\JsRoutingBundle\FOSJsRoutingBundle(),
            // Automatic image resizing
            new \Liip\ImagineBundle\LiipImagineBundle(),
            // Default cache system
            new \Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle(),

            // Clever Process Bundle
            new \CleverAge\ProcessBundle\CleverAgeProcessBundle(),

            // Simple permission management
            new \CleverAge\PermissionBundle\CleverAgePermissionBundle(),

            // CleverAge EAVManager
            new \CleverAge\EAVManager\EAVModelBundle\CleverAgeEAVManagerEAVModelBundle(),
            new \CleverAge\EAVManager\LayoutBundle\CleverAgeEAVManagerLayoutBundle(),
            new \CleverAge\EAVManager\AdminBundle\CleverAgeEAVManagerAdminBundle(),
            new \CleverAge\EAVManager\UserBundle\CleverAgeEAVManagerUserBundle(),
            new \CleverAge\EAVManager\SecurityBundle\CleverAgeEAVManagerSecurityBundle(),
            new \CleverAge\EAVManager\AssetBundle\CleverAgeEAVManagerAssetBundle(),
            new \CleverAge\EAVManager\ProcessBundle\CleverAgeEAVManagerProcessBundle(),

            // ApiPlatformBundle support for EAV manager
            new \CleverAge\EAVManager\ApiPlatformBundle\CleverAgeEAVManagerApiPlatformBundle(),
        ];
    }
237469
protected function Bundles()
    {
        $bundles = PathUtil::Bundles();
        $result = array();
        foreach ($bundles as $bundle)
        {
            if (count($this->Modules($bundle)) > 0)
            {
                $result[] = $bundle;
            }
        }
        return $result;
    }
908988
public function getPluginActivities() {
		$activities = $this->getActivities();

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

		return $activities[ $this->plugin ];
	}
1027910
public function getBundeled() : array
    {
        $directory = MODULARITY_PATH . 'source/php/Module/';
        $bundeled = array();

        foreach (@glob($directory . "*", GLOB_ONLYDIR) as $folder) {
            $bundeled[$folder] = basename($folder);
        }

        return $bundeled;
    }