Get an array with all the bundles the user has created.

@return array
344283
public function getOwnBundles()
    {
        $bundles = array();
        $counter = 1;

        $dir = dirname($this->container->getParameter('kernel.root_dir') . '/') . '/src/';
        $files = scandir($dir);
        foreach ($files as $file) {
            if (is_dir($dir . $file) && !in_array($file, array('.', '..'))) {
                $bundleFiles = scandir($dir . $file);
                foreach ($bundleFiles as $bundleFile) {
                    if (is_dir($dir . $file . '/' . $bundleFile) && !in_array($bundleFile, array('.', '..'))) {
                        $bundles[$counter++] = array(
                            'name' => $bundleFile,
                            'namespace' => $file,
                            'dir' => $dir . $file . '/' . $bundleFile,
                        );
                    }
                }
            }
        }

        return $bundles;
    }
867639
public function toArray()
    {
        return [
            'userAgent'    => $this->userAgent,
            'version'      => $this->version,
            'majorVersion' => $this->majorVersion,
            'minorVersion' => $this->minorVersion,
            'patchVersion' => $this->patchVersion,
            'debug'        => $this->debug,
            'platform'     => $this->platform,
            'device'       => $this->device,
        ];
    }
247302
public function bundle()
    {
        $bundle = new Bundle();
        $iterator = Finder::create()
            ->files()
            ->ignoreVCS(true)
            ->filter($this->package->getBlacklistFilter())
            ->exclude($this->package->getPathVendorRelative())
            ->in($this->package->getDirectory());
        $this->logger->log('    Adding whole project directory "' . $this->package->getDirectory() . '"');
        return $bundle->addDir($iterator);
    }
374875
def get_bundles(self):
        # type: () -> List[Bundle]
        
        with self.__bundles_lock:
            return [
                self.__bundles[bundle_id]
                for bundle_id in sorted(self.__bundles.keys())
            ]
640600
public function toArray()
    {
        return array(
            'scheme' => $this->scheme->get(),
            'user' => $this->user->get(),
            'pass' => $this->pass->get(),
            'host' => $this->host->get(),
            'port' => $this->port->get(),
            'path' => $this->path->get(),
            'query' => $this->query->get(),
            'fragment' => $this->fragment->get(),
        );
    }
1280331
protected function getRequiredClientBundleCodeGenerators($bundle)
    {
        return [
            $this->createClientDependencyProviderCodeGenerator($bundle),
            $this->createClientFactoryCodeGenerator($bundle),
            $this->createClientCodeGenerator($bundle),
            $this->createClientInterfaceCodeGenerator($bundle),
            $this->createStubCodeGenerator($bundle),
            $this->createStubInterfaceCodeGenerator($bundle),
            $this->createGatewayControllerCodeGenerator($bundle),
        ];
    }
1213151
protected function includedResourcesToArray(): array
    {
        $data = [];

        foreach ($this->includedResources as $resource)
        {
            $data[] = $resource->toArray();
        }

        return $data;
    }
311240
public function getPackages() : PackageCollection
    {
        if (null === $this->packages) {
            $packages = array_merge(
                array(
                    $this->getName() => $this,
                ),
                $this->getInstalledPackagesFile()->getPackages()->toArray()
            );

            $this->packages = new PackageCollection($packages);
        }

        return $this->packages;
    }
800173
public function findAll()
    {
        if (null !== $this->yamls) {
            return $this->yamls;
        }

        $yamls = array();

        foreach ($this->kernel->getBundles() as $name => $bundle) {
            foreach ($this->find($bundle) as $yaml) {
                $yamls[$yaml] = $yaml;
            }
        }

        return $this->yamls = $yamls;
    }
678690
public function getMigrationsLocations()
    {
        $migrationsLocations = [];
        foreach ($this->kernel->getBundles() as $bundle) {
            $migrationsLocation = $this->createMigrationsLocation($bundle);
            if ($this->filesystem->exists($migrationsLocation->getDirectory())) {
                $migrationsLocations[] = $migrationsLocation;
            }
        }

        return $migrationsLocations;
    }
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(),
        ];
    }
507826
protected function getKernelParameters()
    {
        $bundles = [];
        $bundlesMetadata = [];

        foreach ($this->bundles as $name => $bundle) {
            $bundles[$name] = \get_class($bundle);
            $bundlesMetadata[$name] = [
                'path' => $bundle->getPath(),
                'namespace' => $bundle->getNamespace(),
            ];
        }

        return [
            /*
             * @deprecated since Symfony 4.2, use kernel.project_dir instead
             */
            'kernel.root_dir' => realpath($this->rootDir) ?: $this->rootDir,
            'kernel.project_dir' => realpath($this->getProjectDir()) ?: $this->getProjectDir(),
            'kernel.environment' => $this->environment,
            'kernel.debug' => $this->debug,
            /*
             * @deprecated since Symfony 4.2
             */
            'kernel.name' => $this->name,
            'kernel.cache_dir' => realpath($cacheDir = $this->warmupDir ?: $this->getCacheDir()) ?: $cacheDir,
            'kernel.logs_dir' => realpath($this->getLogDir()) ?: $this->getLogDir(),
            'kernel.bundles' => $bundles,
            'kernel.bundles_metadata' => $bundlesMetadata,
            'kernel.charset' => $this->getCharset(),
            'kernel.container_class' => $this->getContainerClass(),
        ];
    }
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;
    }
145531
public function collect()
    {
        ksort($this->bundles, SORT_FLAG_CASE | SORT_STRING);

        return new Value\SymfonyKernelSystemInfo([
            'environment' => $this->kernel->getEnvironment(),
            'debugMode' => $this->kernel->isDebug(),
            'version' => Kernel::VERSION,
            'bundles' => $this->bundles,
            'rootDir' => $this->kernel->getRootDir(),
            'name' => $this->kernel->getName(),
            'cacheDir' => $this->kernel->getCacheDir(),
            'logDir' => $this->kernel->getLogDir(),
            'charset' => $this->kernel->getCharset(),
        ]);
    }
1078347
public function getAll(): array
    {
        $response = $this->client->request('GET', $this->resourceUri);

        $json = json_decode((string)$response->getBody());

        $dirItemCollection = [];

        foreach ($json as $starredFile) {
            $dirItemCollection[] = (new DirectoryItem)->fromJson($starredFile);
        }

        return $dirItemCollection;
    }
35763
public function all() : array
    {
        if ($this->themes !== null) {
            return $this->themes;
        }

        return $this->themes = $this->load();
    }
1248441
public function findBundleClasses(): array
    {
        /** @var string[][] $bundleSets */
        $bundleSets = [];

        $modules = $this->packageRepository->findModules();
        foreach ($modules as $module) {
            $extra = $module->getExtra();
            $this->validateBundlesSectionInExtra($extra);
            if (empty($extra['phplist/core']['bundles'])) {
                continue;
            }

            $bundleSets[$module->getName()] = $extra['phplist/core']['bundles'];
        }

        return $bundleSets;
    }