private function UpdateCompilerPass::isArgumentMissingService in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Update/UpdateCompilerPass.php \Drupal\Core\Update\UpdateCompilerPass::isArgumentMissingService()
- 10 core/lib/Drupal/Core/Update/UpdateCompilerPass.php \Drupal\Core\Update\UpdateCompilerPass::isArgumentMissingService()
Checks if a reference argument is to a missing service.
Parameters
mixed $argument: The argument to check.
\Symfony\Component\DependencyInjection\ContainerBuilder $container: The container.
Return value
bool TRUE if the argument is a reference to a service that is missing from the container and the reference is required, FALSE if not.
1 call to UpdateCompilerPass::isArgumentMissingService()
- UpdateCompilerPass::process in core/lib/ Drupal/ Core/ Update/ UpdateCompilerPass.php 
File
- core/lib/ Drupal/ Core/ Update/ UpdateCompilerPass.php, line 85 
Class
- UpdateCompilerPass
- Removes services with unmet dependencies.
Namespace
Drupal\Core\UpdateCode
private function isArgumentMissingService($argument, ContainerBuilder $container) {
  if ($argument instanceof Reference) {
    $argument_id = (string) $argument;
    if (!$container
      ->has($argument_id) && $argument
      ->getInvalidBehavior() === ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) {
      return TRUE;
    }
  }
  return FALSE;
}