Tell Page Object Extension the namespace of our page objects

@param ContainerBuilder $container
492959
protected function setPageObjectNamespaces(ContainerBuilder $container)
    {
        // Append our namespaces as earlier namespaces take precedence.
        $pages = $container->getParameter('sensio_labs.page_object_extension.namespaces.page');
        $pages[] = 'PaulGibbs\WordpressBehatExtension\PageObject';

        $elements = $container->getParameter('sensio_labs.page_object_extension.namespaces.element');
        $elements[] = 'PaulGibbs\WordpressBehatExtension\PageObject\Element';

        $container->setParameter('sensio_labs.page_object_extension.namespaces.page', $pages);
        $container->setParameter('sensio_labs.page_object_extension.namespaces.element', $elements);
    }
291205
public function process(ContainerBuilder $container)
    {
        if (!$container->has($this->getCollectorServiceName())) {
            return;
        }

        $definition = $container->findDefinition(
            $this->getCollectorServiceName()
        );

        $taggedServices = $container->findTaggedServiceIds(
            $this->getTagName()
        );
        foreach ($taggedServices as $id => $tags) {
            $definition->addMethodCall(
                $this->getCollectorMethodName(),
                [new Reference($id)]
            );
        }
    }
122031
protected function getPages(ContainerInterface $container)
	{
		if (null === $this->pages) 
		{
			$siteMainId = 0;
			
			$melisPage = $this->serviceLocator->get('MelisEnginePage');
			$actualPage = $melisPage->getDatasPage($this->idpage);
			if ($actualPage)
			{
				$siteId = 0;
				$datasTemplate = $actualPage->getMelisTemplate();
				if (!empty($datasTemplate->tpl_site_id))
					$siteId = $datasTemplate->tpl_site_id;
				
				if (!empty($siteId) && $siteId > 0)
				{
					$melisTableSite = $this->serviceLocator->get('MelisEngineTableSite');
					$datasSite = $melisTableSite->getSiteById($siteId, getenv('MELIS_PLATFORM'));
					if (!empty($datasSite))
					{
						$datasSite = $datasSite->toArray();
						if (count($datasSite) > 0)
							$siteMainId = $datasSite[0]['site_main_page_id'];
					}
				}
			}

			$navigation = $this->getChildrenRecursive($siteMainId);
			
			$pages      = $this->getPagesFromConfig($navigation);
	
			$this->pages = $this->injectComponents(
					$pages
			);
		}
		
		return $this->pages;
	}
341026
protected function prependTwigBundle(ContainerBuilder $container)
    {
        $config = $this->getConfig($container);
        if (isset($config['auto_configure']) && isset($config['auto_configure']['twig']) && ($config['auto_configure']['twig'])) {
            foreach (array_keys($container->getExtensions()) as $name) {
                switch ($name) {
                    case 'twig':
                        $container->prependExtensionConfig(
                            $name,
                            array(
                                'form' => array('resources' => array('AkumaBootswatchBundle:Form:fields.html.twig')),
//                                'form_themes' => array('AkumaBootswatchBundle:Form:fields.html.twig')
                            )
                        );
                        break;
                }
            }
        }
    }
245639
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition(static::REGISTRY_NAME) || !$container->hasDefinition(static::EVENT_DISPATCHER_NAME)) {
            return;
        }

        $registry = $container->getDefinition(static::REGISTRY_NAME);
        $dispatcherReference = new Reference(static::EVENT_DISPATCHER_NAME);
        $parameterBag = $container->getParameterBag();

        foreach ($container->findTaggedServiceIds(static::TAG_NAME) as $id => $tags) {
            $registry->addMethodCall("addDriver", [new Reference($id)]);

            // Inject the dispatcher in the driver
            $driver = $container->getDefinition($id);
            $driver->addMethodCall("setDispatcher", [$dispatcherReference]);

            foreach ($tags as $tag) {
                if (isset($tag[static::LISTENER_TAG_PARAMETER])) {
                    $listenerCode = $parameterBag->resolveValue($tag[static::LISTENER_TAG_PARAMETER]);

                    if (!$container->hasDefinition($listenerCode)) {
                        throw new ServiceNotFoundException(sprintf("The service '%s' doesn't exist", $listenerCode));
                    }

                    $listener = $container->getDefinition($listenerCode);
                    $listenerClass = $parameterBag->resolveValue($listener->getClass());

                    $reflection = new \ReflectionClass($listenerClass);

                    if (false === $reflection->implementsInterface(static::DRIVER_LISTENER_INTERFACE)) {
                        throw new InvalidArgumentException(sprintf(
                            "The service '%s' must implement interface '%s' but doesn't",
                            $listenerCode,
                            static::DRIVER_LISTENER_INTERFACE
                        ));
                    }

                    $listener->addMethodCall("setDriver", [new Reference($id)]);
                }
            }
        }
    }
345437
public function process(ContainerBuilder $container)
    {
        $this->container = $container;

        foreach ($container->getDefinitions() as $definition) {
            if ($definition->isSynthetic() || $definition->isAbstract()) {
                continue;
            }

            $definition->setArguments($this->processArguments($definition->getArguments()));
            $definition->setMethodCalls($this->processArguments($definition->getMethodCalls()));
            $definition->setProperties($this->processArguments($definition->getProperties()));
            $definition->setFactory($this->processFactory($definition->getFactory()));
        }

        foreach ($container->getAliases() as $id => $alias) {
            $aliasId = (string) $alias;
            if ($aliasId !== $defId = $this->getDefinitionId($aliasId)) {
                $container->setAlias($id, new Alias($defId, $alias->isPublic()));
            }
        }
    }
1271601
public function process(ContainerBuilder $container)
    {
        $this->processDriverPass($container);
        $this->processDriverElementPass($container);
        $this->processEventSubscriberPass($container);
        $this->processClassGenerator($container);

        $this->setPageObjectNamespaces($container);
        $this->injectSiteUrlIntoPageObjects($container);
    }
379028
public function process(ContainerBuilder $container)
    {
        $this->documentMap = $container->get('graviton.document.map');

        $map = [];
        foreach ($this->documentMap->getDocuments() as $document) {
            $map[$document->getClass()] = $this->getFieldNames($document);
        }
        $container->setParameter('graviton.document.field.names', $map);
    }
4576
public function process(ContainerBuilder $container)
    {
        $twig = $container->getDefinition('twig');

        $languages = array('en', 'fr');
        if ($container->hasParameter('open_orchestra_base.administration_languages')) {
            $languages = $container->getParameter('open_orchestra_base.administration_languages');
        }

        $twig->addMethodCall('addGlobal', array('administration_languages', $languages));
    }
787392
public function process(ContainerBuilder $container)
    {
        if (!$container->has('support_tools.system_info.output_registry')) {
            return;
        }

        $outputFormattersTagged = $container->findTaggedServiceIds('support_tools.system_info.output_format');

        $outputFormatters = [];
        foreach ($outputFormattersTagged as $id => $tags) {
            foreach ($tags as $attributes) {
                $outputFormatters[$attributes['format']] = new Reference($id);
            }
        }

        $outputFormatRegistryDef = $container->findDefinition('support_tools.system_info.output_registry');
        $outputFormatRegistryDef->setArguments([$outputFormatters]);
    }
1035099
public function process(ContainerBuilder $container)
    {
        if (!$container->has(DataProviderManager::class)) {
            return;
        }

        // Get the data provider manager service definition to register plugins into.
        $dpmDefinition = $container->getDefinition(DataProviderManager::class);
        $pmDefinition = $container->getDefinition(PluginManager::class);

        $providerData = [];

        // Get provider service names.
        $dataProviders = $container->findTaggedServiceIds('expansion.dataprovider');
        foreach ($dataProviders as $id => $tags) {
            foreach ($tags as $attributes) {
                $providerData[$id]['provider'] = $attributes['provider'];
                $providerData[$id]['interface'] = $attributes['interface'];
            }
        }

        // Get compatibility information for each provider
        $dataProviders = $container->findTaggedServiceIds('expansion.dataprovider.compatibility');
        foreach ($dataProviders as $id => $tags) {
            foreach ($tags as $attributes) {
                $providerData[$id]['compatibility'][] = [
                    'title' => isset($attributes['title']) ? $attributes['title'] : DataProviderManager::COMPATIBLE_ALL,
                    'gamemode' => isset($attributes['gamemode']) ? $attributes['gamemode'] : DataProviderManager::COMPATIBLE_ALL,
                    'script' => isset($attributes['script']) ? strtolower($attributes['script']) : DataProviderManager::COMPATIBLE_ALL,
                ];
            }
        }

        // Get base events the data provider needs to listen to.
        $dataProviders = $container->findTaggedServiceIds('expansion.dataprovider.listener');
        foreach ($dataProviders as $id => $tags) {
            foreach ($tags as $attributes) {
                $providerData[$id]['listener'][$attributes['event_name']] = $attributes['method'];
            }
        }

        // Get parent plugins the data provider requires.
        $plugins = $container->findTaggedServiceIds('expansion.dataprovider.parent');
        foreach ($plugins as $id => $tags) {
            foreach ($tags as $attributes) {
                $providerData[$id]['parent'][] = $attributes['parent'];
            }
        }

        // Finally register collected data.
        foreach ($providerData as $id => $data) {
            $dpmDefinition->addMethodCall('registerDataProvider', [
                    $id,
                    $data['provider'],
                    $data['interface'],
                    $data['compatibility'],
                    !empty($data['listener']) ? $data['listener'] : [],
                ]
            );

            $pmDefinition->addMethodCall('registerPlugin', [
                    $id,
                    [],
                    isset($data['parent']) ? $data['parent'] : [],
                    $data['provider'],
                ]
            );
        }
    }
1127952
private function injectFormThemeConfiguration(ContainerBuilder $container)
    {
        if (($twigConfiguration = $container->getParameter('admingenerator.twig')) !== false) {
            $resources = $container->getParameter('twig.form.resources');
            $alreadyIn = in_array('bootstrap_3_layout.html.twig', $resources);

            if ($twigConfiguration['use_form_resources'] && !$alreadyIn) {
                $key = array_search('form_div_layout.html.twig', $resources) ? array_search('form_div_layout.html.twig', $resources) : 0;
                // Insert right after form_div_layout.html.twig if exists
                array_splice($resources, ++$key, 0, array('bootstrap_3_layout.html.twig'));

                $container->setParameter('twig.form.resources', $resources);
            }
        }
    }
949884
private function setStandardThemeDirectories(ContainerBuilder $container)
    {
        if (!$container->hasParameter('kernel.bundles_metadata')) {
            return;
        }

        $bundlesMetaData = $container->getParameter('kernel.bundles_metadata');
        if (!isset($bundlesMetaData['EzPublishCoreBundle']['path'])) {
            return;
        }

        $templatesPathMap = $container->hasParameter('ezdesign.templates_path_map')
            ? $container->getParameter('ezdesign.templates_path_map')
            : [];

        $templatesPathMap['standard'][] = $bundlesMetaData['EzPublishCoreBundle']['path'] . '/Resources/views';

        $container->setParameter('ezdesign.templates_path_map', $templatesPathMap);
    }
283090
public function process(ContainerBuilder $container): void
    {
        if ($container->has('ezpublish.image_alias.imagine.cache_resolver')) {
            $container
                ->findDefinition('ezpublish.image_alias.imagine.cache_resolver')
                ->setClass(IORepositoryResolver::class);
        }
    }
1215565
private function overrideEntities(ContainerBuilder $container)
    {
        if ($this instanceof EntitiesOverridableExtension) {
            $overrides = $this->getEntitiesOverrides();
            foreach ($overrides as $interface => $override) {
                $overrides[$interface] = $container->getParameter($override);
            }

            $container->prependExtensionConfig('doctrine', [
                'orm' => [
                    'resolve_target_entities' => $overrides,
                ],
            ]);
        }
    }
82267
public function process(ContainerBuilder $container)
    {
        $this->registerStateExtractors($container);
        $this->registerStateElements($container);
        $this->registerResultModifications($container);
    }
39564
protected function loadRepository(ContainerBuilder $container)
    {
        $definition = new Definition('Behat\Behat\Transformation\TransformationRepository', array(
            new Reference(EnvironmentExtension::MANAGER_ID)
        ));
        $container->setDefinition(self::REPOSITORY_ID, $definition);
    }