function ControllerResolver::getControllerFromDefinition
Same name in other branches
- 9 core/lib/Drupal/Core/Controller/ControllerResolver.php \Drupal\Core\Controller\ControllerResolver::getControllerFromDefinition()
- 8.9.x core/lib/Drupal/Core/Controller/ControllerResolver.php \Drupal\Core\Controller\ControllerResolver::getControllerFromDefinition()
- 11.x core/lib/Drupal/Core/Controller/ControllerResolver.php \Drupal\Core\Controller\ControllerResolver::getControllerFromDefinition()
1 call to ControllerResolver::getControllerFromDefinition()
- ControllerResolver::getController in core/
lib/ Drupal/ Core/ Controller/ ControllerResolver.php
File
-
core/
lib/ Drupal/ Core/ Controller/ ControllerResolver.php, line 48
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.