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

Breadcrumb

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

function ContainerControllerResolver::throwExceptionIfControllerWasRemoved

1 call to ContainerControllerResolver::throwExceptionIfControllerWasRemoved()
ContainerControllerResolver::instantiateController in vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php
Returns an instantiated controller.

File

vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php, line 55

Class

ContainerControllerResolver
A controller resolver searching for a controller in a psr-11 container when using the "service::method" notation.

Namespace

Symfony\Component\HttpKernel\Controller

Code

private function throwExceptionIfControllerWasRemoved(string $controller, \Throwable $previous) : void {
    if ($this->container instanceof Container && isset($this->container
        ->getRemovedIds()[$controller])) {
        throw new \InvalidArgumentException(\sprintf('Controller "%s" cannot be fetched from the container because it is private. Did you forget to tag the service with "controller.service_arguments"?', $controller), 0, $previous);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal