function ControllerResolver::getControllerFromDefinition
Overrides ControllerResolverInterface::getControllerFromDefinition
1 call to ControllerResolver::getControllerFromDefinition()
- ControllerResolver::getController in core/
lib/ Drupal/ Core/ Controller/ ControllerResolver.php - Returns the Controller instance associated with a Request.
File
-
core/
lib/ Drupal/ Core/ Controller/ ControllerResolver.php, line 32
Class
- ControllerResolver
- ControllerResolver to enhance controllers beyond Symfony's basic handling.
Namespace
Drupal\Core\ControllerCode
public function getControllerFromDefinition($controller, $path = '') {
try {
$callable = $this->callableResolver
->getCallableFromDefinition($controller);
} catch (\InvalidArgumentException $e) {
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable.', $path), 0, $e);
}
return $callable;
}