This method parses the parent-child conditions.

@param ContainerInterface $container The container where the data shall be stored.

@return void
974880
protected function parseParentChildConditions(ContainerInterface $container)
    {
        if ($container->hasDefinition(ModelRelationshipDefinitionInterface::NAME)) {
            $definition = $container->getDefinition(ModelRelationshipDefinitionInterface::NAME);
        } else {
            $definition = new DefaultModelRelationshipDefinition();
        }

        // If mode is 5, we need to define tree view.
        if (5 === $this->getFromDca('list/sorting/mode')) {
            $rootProvider = $this->getRootProviderName($container);

            if (null === ($relationship = $definition->getRootCondition())) {
                $relationship = new RootCondition();
                $relationship
                    ->setSourceName($rootProvider);
                $definition->setRootCondition($relationship);

                $builder = FilterBuilder::fromArrayForRoot()->getFilter();
            } else {
                $builder = FilterBuilder::fromArrayForRoot($relationship->getFilterArray())->getFilter();
            }

            $relationship
                ->setSetters(
                    \array_merge_recursive(
                        [['property' => 'pid', 'value' => '0']]
                    ),
                    $relationship->getSetters()
                );

            $builder->andPropertyEquals('pid', '0');

            $relationship
                ->setFilterArray($builder->getAllAsArray());

            if (null === ($relationship = $definition->getChildCondition($rootProvider, $rootProvider))) {
                $relationship = new ParentChildCondition();
                $relationship
                    ->setSourceName($rootProvider)
                    ->setDestinationName($rootProvider);
                $definition->addChildCondition($relationship);

                $builder = FilterBuilder::fromArray()->getFilter();
            } else {
                $builder = FilterBuilder::fromArray($relationship->getFilterArray())->getFilter();
            }

            $relationship
                ->setSetters(
                    \array_merge_recursive(
                        [['to_field' => 'pid', 'from_field' => 'id']]
                    ),
                    $relationship->getSetters()
                );

            $builder->andRemotePropertyEquals('pid', 'id');
            $relationship
                ->setFilterArray($builder->getAllAsArray());

            $container->setDefinition(ModelRelationshipDefinitionInterface::NAME, $definition);
        }

        // If ptable defined and no root setter we need to add (Contao default id=>pid mapping).
        if (null !== $this->getFromDca('config/ptable')) {
            $rootProvider = $this->getRootProviderName($container);

            if (null === ($relationship = $definition->getRootCondition())) {
                $relationship = new RootCondition();
                $relationship
                    ->setSourceName($rootProvider);

                $definition->setRootCondition($relationship);
            }

            if (!$relationship->getSetters()) {
                $relationship
                    ->setSetters(
                        \array_merge_recursive(
                            [['property' => 'pid', 'value' => '0']]
                        ),
                        $relationship->getSetters()
                    );
            }

            $container->setDefinition(ModelRelationshipDefinitionInterface::NAME, $definition);
        }
    }
1359988
protected function setDependencies(Container $container)
    {
        parent::setDependencies($container);

        $this->setDebug($container['debug']);
        $this->setTranslator($container['translator']);
        $this->setAppConfig($container['config']);
        $this->setBaseUrl($container['base-url']);

        $metatags = $this->appConfig('cms.metatags');
        if (is_array($metatags)) {
            $this->setSeoMetadata($metatags);
        }
    }
1109577
public function process(ContainerBuilder $container): void
    {
        if (!$container->has('assetic.twig_formula_loader.real')) {
            return;
        }

        $container
            ->findDefinition('assetic.twig_formula_loader.real')
            ->replaceArgument(1, null);
    }
895720
protected function setDependencies(Container $container)
    {
        parent::setDependencies($container);

        if (isset($container['config']['templates'])) {
            $this->availableTemplates = $this->parseChoices($container['config']['templates']);
            $this->choices = $this->availableTemplates;
        }
    }
1001449
public function process(ContainerBuilder $container)
    {
        $parameterBag = $container->getParameterBag();

        foreach ($container->getDefinitions() as $id => $definition) {
            try {
                $definition->setClass($parameterBag->resolveValue($definition->getClass()));
                $definition->setFile($parameterBag->resolveValue($definition->getFile()));
                $definition->setArguments($parameterBag->resolveValue($definition->getArguments()));

                $factory = $definition->getFactory();

                if (is_array($factory) && isset($factory[0])) {
                    $factory[0] = $parameterBag->resolveValue($factory[0]);
                    $definition->setFactory($factory);
                }

                $calls = array();
                foreach ($definition->getMethodCalls() as $name => $arguments) {
                    $calls[$parameterBag->resolveValue($name)] = $parameterBag->resolveValue($arguments);
                }
                $definition->setMethodCalls($calls);

                $definition->setProperties($parameterBag->resolveValue($definition->getProperties()));
            } catch (ParameterNotFoundException $e) {
                $e->setSourceId($id);

                throw $e;
            }
        }

        $aliases = array();
        foreach ($container->getAliases() as $name => $target) {
            $aliases[$parameterBag->resolveValue($name)] = $parameterBag->resolveValue($target);
        }
        $container->setAliases($aliases);

        $parameterBag->resolve();
    }
709613
public function run(ContainerInterface $container): void
    {
        foreach ($this->getSeeds($container) as $seederClass) {
            $this->getIO()->writeInfo("Starting seed for `$seederClass`..." . PHP_EOL, IoInterface::VERBOSITY_VERBOSE);
            $this->executeSeedInit($container, $seederClass);
            /** @var SeedInterface $seeder */
            $seeder = new $seederClass();
            $seeder->init($container)->run();
            $this->getIO()->writeInfo("Seed finished for `$seederClass`." . PHP_EOL, IoInterface::VERBOSITY_NORMAL);
        }
    }
735785
public function process(ContainerBuilder $container)
    {
        $configuration = $container->get('configuration', ContainerInterface::NULL_ON_INVALID_REFERENCE);
        if ($configuration instanceof ConfigurationInterface) {
            $this->registerService($container, 'deployment_strategy', $configuration->getDeploymentStrategyClass());

            $connectionManager = $container->get('connection_manager', ContainerInterface::NULL_ON_INVALID_REFERENCE);
            if ($connectionManager instanceof ConnectionManagerInterface) {
                foreach ($configuration->getDeploymentConnectionClasses() as $connectionType => $connectionAdapterClass) {
                    $connectionManager->registerConnectionAdapter($connectionType, $connectionAdapterClass);
                }
            }
        }
    }
514774
protected function setDependencies(ServiceContainer $container)
    {
        parent::setDependencies($container);

        if (isset($container['attachments/config'])) {
            $this->setConfig($container['attachments/config']);
        } elseif (isset($container['config']['attachments'])) {
            $this->setConfig($container['config']['attachments']);
        }
    }
524817
protected function parseDataProvider(ContainerInterface $container)
    {
        if ($container->hasDataProviderDefinition()) {
            $config = $container->getDataProviderDefinition();
        } else {
            $config = new DefaultDataProviderDefinition();
            $container->setDataProviderDefinition($config);
        }

        // If mode is 5, we need to define tree view.
        if ((5 === $this->getFromDca('list/sorting/mode'))
            && !$container->getBasicDefinition()->getRootDataProvider()
        ) {
            $container->getBasicDefinition()->setRootDataProvider($container->getName());
        }

        if (null !== ($parentTable = $this->getFromDca('config/ptable'))) {
            // Check config if it already exists, if not, add it.
            if (!$config->hasInformation($parentTable)) {
                $providerInformation = new ContaoDataProviderInformation();
                $providerInformation->setName($parentTable);
                $config->addInformation($providerInformation);
            } else {
                $providerInformation = $config->getInformation($parentTable);
            }

            if ($providerInformation instanceof ContaoDataProviderInformation) {
                $initializationData = (array) $providerInformation->getInitializationData();

                $providerInformation
                    ->setTableName($parentTable)
                    ->setInitializationData(
                        \array_merge(
                            [
                                'source' => $parentTable,
                                'name'   => $parentTable,
                            ],
                            $initializationData
                        )
                    );

                if (!$container->getBasicDefinition()->getRootDataProvider()) {
                    $container->getBasicDefinition()->setRootDataProvider($parentTable);
                }
                if (!$container->getBasicDefinition()->getParentDataProvider()) {
                    $container->getBasicDefinition()->setParentDataProvider($parentTable);
                }
            }
        }

        $providerName = $container->getBasicDefinition()->getDataProvider() ?: $container->getName();

        // Check config if it already exists, if not, add it.
        if (!$config->hasInformation($providerName)) {
            $providerInformation = new ContaoDataProviderInformation();
            $providerInformation->setName($providerName);
            $config->addInformation($providerInformation);
        } else {
            $providerInformation = $config->getInformation($providerName);
        }

        if ($providerInformation instanceof ContaoDataProviderInformation) {
            $initializationData = (array) $providerInformation->getInitializationData();

            if (!isset($initializationData['source'])) {
                $providerInformation
                    ->setTableName($providerName)
                    ->setInitializationData(
                        \array_merge(
                            [
                                'source' => $providerName,
                                'name'   => $providerName
                            ],
                            $initializationData
                        )
                    );
            }
            $providerInformation
                ->setVersioningEnabled((bool) $this->getFromDca('config/enableVersioning'));

            if (!$container->getBasicDefinition()->getDataProvider()) {
                $container->getBasicDefinition()->setDataProvider($providerName);
            }
        }
    }
297857
public function process(ContainerBuilder $container)
    {
        if (
            !$container->hasDefinition(self::VIEW_BUILDER_REGISTRY)
            || !$container->hasDefinition(self::VIEW_BUILDER_CONTENT_TRANSLATE)
        ) {
            return;
        }

        $registry = $container->findDefinition(self::VIEW_BUILDER_REGISTRY);

        $viewBuilders = [
            $container->getDefinition(self::VIEW_BUILDER_CONTENT_TRANSLATE),
        ];

        $registry->addMethodCall('addToRegistry', [$viewBuilders]);
    }
1277211
public function process(ContainerBuilder $container)
    {
        $taggedServices = $container->findTaggedServiceIds(
            self::TAG_NAME
        );

        foreach ($taggedServices as $id => $tag) {
            $definition = $container->findDefinition($id);

            $this->processTag($tag, $definition);
        }
    }
787371
protected function setDependencies(Container $container)
    {
        parent::setDependencies($container);

        if (isset($container['admin/config']['apis.google.map.key'])) {
            $this->setApiKey($container['admin/config']['apis.google.map.key']);
        } elseif (isset($container['config']['apis.google.map.key'])) {
            $this->setApiKey($container['config']['apis.google.map.key']);
        }

        /**
         * @todo Make this configurable
         */
        if (isset($appConfig['alert.map.map'])) {
            $this->setMapOptions($appConfig['alert.map']);
        }
    }
1246859
public function setDependencies(Container $container)
    {
        parent::setDependencies($container);

        $this->basePath = $container['config']['base_path'];
        $this->publicPath = $container['config']['public_path'];

        $this->setElfinderConfig($container['elfinder/config']);
        $this->setPropertyFactory($container['property/factory']);
        $this->setCallableResolver($container['callableResolver']);

        /** @see \Charcoal\App\ServiceProvide\FilesystemServiceProvider */
        $this->filesystemConfig = $container['filesystem/config'];
        $this->filesystems = $container['filesystems'];
    }
1271601
public function process(ContainerBuilder $container)
    {
        $this->processDriverPass($container);
        $this->processDriverElementPass($container);
        $this->processEventSubscriberPass($container);
        $this->processClassGenerator($container);

        $this->setPageObjectNamespaces($container);
        $this->injectSiteUrlIntoPageObjects($container);
    }
538760
final public function internalSetParent(ParentNodeInterface $parent)
    {
        $this->emit('parent.change', [$parent, $this]);
        $this->parentNode = $parent;
    }
43933
public function setContainer(ContainerInterface $container = null)
    {
        $this->container = $container;
        $this->eventDispatcher = $this->container->get('event_dispatcher');
    }
233386
public function process(ContainerBuilder $container)
    {
        $this->container = $container;

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

            $this->currentId = $id;

            $this->validateReferences($definition->getArguments());
            $this->validateReferences($definition->getMethodCalls());
            $this->validateReferences($definition->getProperties());
        }
    }