Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RemoveUnusedDefinitionsPass.php

function RemoveUnusedDefinitionsPass::processValue

Overrides AbstractRecursivePass::processValue

1 call to RemoveUnusedDefinitionsPass::processValue()
RemoveUnusedDefinitionsPass::process in vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php
Processes the ContainerBuilder to remove unused definitions.

File

vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php, line 77

Class

RemoveUnusedDefinitionsPass
Removes unused service definitions from the container.

Namespace

Symfony\Component\DependencyInjection\Compiler

Code

protected function processValue(mixed $value, bool $isRoot = false) : mixed {
    if (!$value instanceof Reference) {
        return parent::processValue($value, $isRoot);
    }
    if (ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $value->getInvalidBehavior()) {
        $this->connectedIds[] = (string) $value;
    }
    return $value;
}
RSS feed
Powered by Drupal