Returns the Contao resources paths as array.

@param ContainerBuilder $container The container builder.

@return array
191815
private function getResourcePaths(ContainerBuilder $container)
    {
        $paths   = [];
        $rootDir = dirname($container->getParameter('kernel.root_dir'));

        foreach ($container->getParameter('kernel.bundles') as $name => $class) {
            if (null !== ($path = $this->getResourcePathFromBundle($rootDir, $name, $class))) {
                $paths[] = $path;
            }
        }

        if (is_readable($rootDir . '/app/Resources/contao/config/services.php')) {
            $paths[] = $rootDir . '/app/Resources/contao/config/services.php';
        }

        if (is_readable($rootDir . '/system/config/services.php')) {
            $paths[] = $rootDir . '/system/config/services.php';
        }

        return $paths;
    }
41682
public function prepend(ContainerBuilder $container)
    {
        if ($container->hasExtension('sulu_search')) {
            $container->prependExtensionConfig(
                'sulu_search',
                [
                    'indexes' => [
                        'contact' => [
                            'security_context' => 'sulu.contact.people',
                        ],
                        'account' => [
                            'security_context' => 'sulu.contact.organizations',
                        ],
                    ],
                ]
            );
        }

        if ($container->hasExtension('sulu_media')) {
            $container->prependExtensionConfig(
                'sulu_media',
                [
                    'system_collections' => [
                        'sulu_contact' => [
                            'meta_title' => ['en' => 'Sulu contacts', 'de' => 'Sulu Kontakte'],
                            'collections' => [
                                'contact' => [
                                    'meta_title' => ['en' => 'People', 'de' => 'Personen'],
                                ],
                                'account' => [
                                    'meta_title' => ['en' => 'Organizations', 'de' => 'Organisationen'],
                                ],
                            ],
                        ],
                    ],
                ]
            );
        }

        if ($container->hasExtension('sulu_admin')) {
            $container->prependExtensionConfig(
                'sulu_admin',
                [
                    'lists' => [
                        'directories' => [
                            __DIR__ . '/../Resources/config/lists',
                        ],
                    ],
                    'forms' => [
                        'directories' => [
                            __DIR__ . '/../Resources/config/forms',
                        ],
                    ],
                    'resources' => [
                        'contacts' => [
                            'routes' => [
                                'list' => 'get_contacts',
                                'detail' => 'get_contact',
                            ],
                        ],
                        'accounts' => [
                            'routes' => [
                                'list' => 'get_accounts',
                                'detail' => 'get_account',
                            ],
                        ],
                        'contact_titles' => [
                            'routes' => [
                                'list' => 'get_contact-titles',
                            ],
                        ],
                        'contact_positions' => [
                            'routes' => [
                                'list' => 'get_contact-positions',
                            ],
                        ],
                    ],
                    'field_type_options' => [
                        'single_selection' => [
                            'single_account_selection' => [
                                'default_type' => 'auto_complete',
                                'resource_key' => 'accounts',
                                'types' => [
                                    'auto_complete' => [
                                        'display_property' => 'name',
                                        'search_properties' => ['number', 'name'],
                                    ],
                                    'list_overlay' => [
                                        'adapter' => 'table',
                                        'list_key' => 'accounts',
                                        'display_properties' => ['name'],
                                        'empty_text' => 'sulu_contact.no_account_selected',
                                        'icon' => 'su-house',
                                        'overlay_title' => 'sulu_contact.single_account_selection_overlay_title',
                                    ],
                                ],
                            ],
                            'single_contact_selection' => [
                                'default_type' => 'list_overlay',
                                'resource_key' => 'contacts',
                                'types' => [
                                    'list_overlay' => [
                                        'adapter' => 'table',
                                        'list_key' => 'contacts',
                                        'display_properties' => ['fullName'],
                                        'empty_text' => 'sulu_contact.no_contact_selected',
                                        'icon' => 'su-user',
                                        'overlay_title' => 'sulu_contact.single_contact_selection_overlay_title',
                                    ],
                                ],
                            ],
                            'single_contact_title_selection' => [
                                'default_type' => 'single_select',
                                'resource_key' => 'contact_titles',
                                'types' => [
                                    'single_select' => [
                                        'id_property' => 'id',
                                        'display_property' => 'title',
                                        'overlay_title' => 'sulu_contact.edit_title_overlay_title',
                                    ],
                                ],
                            ],
                            'single_contact_position_selection' => [
                                'default_type' => 'single_select',
                                'resource_key' => 'contact_positions',
                                'types' => [
                                    'single_select' => [
                                        'id_property' => 'id',
                                        'display_property' => 'position',
                                        'overlay_title' => 'sulu_contact.edit_position_overlay_title',
                                    ],
                                ],
                            ],
                        ],
                    ],
                ]
            );
        }
    }
354110
public function process(ContainerBuilder $container)
    {
        $templatesPathMap = $container->hasParameter('ezdesign.templates_path_map')
            ? $container->getParameter('ezdesign.templates_path_map')
            : [];

        $templatesPathMap['admin'][] = realpath(__DIR__ . '/../../Resources/views');

        $container->setParameter('ezdesign.templates_path_map', $templatesPathMap);
    }
1352972
public function process(ContainerBuilder $container)
    {
        $services = [];
        $finder = Finder::create()
                        ->files()
                        ->in(Graviton::getBundleScanDir())
                        ->path('/\/analytics\//i')
                        ->name('*.json')
                        ->notName('_*')
                        ->notName('*.pipeline.*')
                        ->sortByName();

        foreach ($finder as $file) {
            $key = $file->getFilename();
            $data = json_decode($file->getContents(), true);
            if (json_last_error()) {
                throw new InvalidConfigurationException(
                    sprintf('Analytics file: %s could not be loaded due to error: %s', $key, json_last_error_msg())
                );
            }

            if (isset($data['route']) && !empty($data['route'])) {
                $services[$data['route']] = $data;
            } else {
                $services[] = $data;
            }
        }

        $container->setParameter('analytics.services', $services);
    }
965485
public function process(ContainerBuilder $container)
    {
        /** @var Glob $glob */
        $glob = $container->get(Glob::class);

        $locales = $glob->execGlob(ROOT . 'lang/*.po');
        $locales = array_map(function ($file) {
            return basename($file, '.po');
        }, $locales);

        $container->setParameter('locales', $locales);
    }
1305198
public function getTemplateRootPaths()
    {
        if ($this->templateRootPaths !== []) {
            return $this->templateRootPaths;
        }

        if ($this->templateRootPathPattern === null) {
            return [];
        }

        $templateRootPath = $this->templateRootPathPattern;
        if (isset($this->patternReplacementVariables['packageKey'])) {
            $templateRootPath = str_replace('@packageResourcesPath', 'resource://' . $this->patternReplacementVariables['packageKey'], $templateRootPath);
        }

        return [$templateRootPath];
    }
1139525
private function getThemeDirs(ContainerBuilder $container, array $themeList): array
    {
        $paths = array_map(
            static function (array $bundleMetadata): string {
                return $bundleMetadata['path'] . '/Resources/views/ngbm/themes';
            },
            // Reversing the list of bundles so bundles added at end have higher priority
            // when searching for a template
            array_reverse($container->getParameter('kernel.bundles_metadata'))
        );

        $paths = array_values(array_filter($paths, 'is_dir'));

        if ($container->hasParameter('twig.default_path')) {
            $defaultTwigDir = $container->getParameterBag()->resolveValue($container->getParameter('twig.default_path')) . '/ngbm/themes';
            if (is_dir($defaultTwigDir)) {
                array_unshift($paths, $defaultTwigDir);
            }
        }

        $appDir = $this->getAppDir($container) . '/Resources/views/ngbm/themes';
        if (is_dir($appDir)) {
            array_unshift($paths, $appDir);
        }

        $themeDirs = [];
        foreach ($paths as $path) {
            foreach ($themeList as $themeName) {
                $themeDirs[$themeName][] = $path . '/' . $themeName;
            }
        }

        return $themeDirs;
    }
692233
public function load(ContainerBuilder $container, array $config)
    {
        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/config'));
        $loader->load('services.xml');

        if (!empty($config['path'])) {
            if (isset($config['path']['resources'])) {
                $container->setParameter('paths.resources.resource', $config['path']['resources']);
            }

            if (isset($config['path']['base'])) {
                $container->setParameter('paths.resources.base', $config['path']['base']);
            }
        }

        if (!empty($config['resource_map'])) {
            $container->setParameter('resource.map', $config['resource_map']);
        }
    }
1195785
public function getResourcePaths()
    {
        $paths = [];

        foreach ($this->bundles as $name => $class) {
            if (null !== ($path = $this->getResourcePathFromBundle($this->appRoot, $name, $class))) {
                $paths[] = $path;
            }
        }

        if (is_readable($file = $this->appRoot . '/app/Resources/contao/config/' . $this->fileName)) {
            $paths[] = $file;
        }

        if (is_readable($file = $this->appRoot . '/system/config/' . $this->fileName)) {
            $paths[] = $file;
        }

        return $paths;
    }
1300103
public function process(ContainerBuilder $container)
    {
        $this->documentMap = $container->get('graviton.document.map');

        $map = [];

        $services = array_keys($container->findTaggedServiceIds('graviton.rest'));
        foreach ($services as $id) {
            list($ns, $bundle, , $doc) = explode('.', $id);
            if (empty($bundle) || empty($doc)) {
                continue;
            }
            if ($bundle === 'core' && $doc === 'main') {
                continue;
            }

            $className = $this->getServiceDocument(
                $container->getDefinition($id),
                $ns,
                $bundle,
                $doc
            );
            $extRefFields = $this->processDocument($this->documentMap->getDocument($className));
            $routePrefix = strtolower($ns.'.'.$bundle.'.'.'rest'.'.'.$doc);

            $map[$routePrefix.'.get'] = $extRefFields;
            $map[$routePrefix.'.all'] = $extRefFields;
        }

        $container->setParameter('graviton.document.extref.fields', $map);
    }
1025200
private function getDefinitionDirs(array $driverConfig, ContainerBuilder $container)
    {
        $modelDir = $this->getDefinitionDir('model', $driverConfig, $container);
        $mixinDir = $this->getDefinitionDir('mixin', $driverConfig, $container);
        $embedDir = $this->getDefinitionDir('embed', $driverConfig, $container);
        return [$modelDir, $mixinDir, $embedDir];
    }
396129
public static function getFirewallNames(Container $container)
    {
        $names = [];
        foreach ($container->getServiceIds() as $serviceId) {
            if ('security.firewall.map.context.' === substr($serviceId, 0, 30)) {
                $names[] = substr($serviceId, 30);
            }
        }

        return $names;
    }
1289723
protected function _parseContainer(Container $container)
    {
        $map = array();

        foreach ($container->keys() as $name) {
            if ($item = $this->_parseItem($container, $name)) {
                $map[] = $item;
            }
        }

        $map = $this->_normalizeMap($map);

        return $map;
    }
281876
public function buildGlobalFilterRegistries(ContainerBuilder $container)
    {
        $filters          = $container->findTaggedServiceIds('spray_persistence.entity_filter');
        $registries = $container->findTaggedServiceIds('spray_persistence.filter_registry');
        foreach ($filters as $filterId => $filterOptions) {
            foreach (array_filter($filterOptions, array($this, 'filterGlobalFilterOptions')) as $options) {
                foreach ($registries as $registryId => $registryOptions) {
                    $this->attachFilterToRegistry(
                        $this->locateFilterRegistry($container, $registryId),
                        $filterId,
                        $options
                    );
                }
            }
        }
    }
1350576
public static function getCacheDirPaths()
	{
		$cacheDir = \System::getContainer()->getParameter('kernel.cache_dir') . '/contao';

		$dirFullPath = $cacheDir . '/rocksolid_icon_picker';
		$dirPath = $dirFullPath;
		if (
			substr($dirPath, 0, strlen(TL_ROOT) + 1) === TL_ROOT . '/'
			|| substr($dirPath, 0, strlen(TL_ROOT) + 1) === TL_ROOT . '\\'
		) {
			$dirPath = substr($dirPath, strlen(TL_ROOT) + 1);
		}

		return array(
			'path' => $dirPath,
			'fullPath' => $dirFullPath,
		);
	}
1021110
function getComponentNodes ($container, traverse = true, arr = []) {
  if ($container._durruti) {
    arr.push($container)
  }

  if (traverse && $container.children) {
    for (let i = 0; i < $container.children.length; i++) {
      getComponentNodes($container.children[i], traverse, arr)
    }
  }

  return arr
}
306919
private function findManifestPath(ContainerBuilder $container)
    {
        $manifestPath = $container->getParameter('fxp_require_asset.webpack.adapter.manifest.file');

        if (null === $manifestPath && $container->hasDefinition('assets._version__default')) {
            $def = $container->getDefinition('assets._version__default');

            if (\count($def->getArguments()) > 0) {
                $manifestPath = $def->getArgument(0);
                $container->setParameter('fxp_require_asset.webpack.adapter.manifest.file', $manifestPath);
            }
        }

        return $manifestPath;
    }