function ControllerResolver::getController
Same name in other branches
- 9 core/lib/Drupal/Core/Controller/ControllerResolver.php \Drupal\Core\Controller\ControllerResolver::getController()
- 8.9.x core/lib/Drupal/Core/Controller/ControllerResolver.php \Drupal\Core\Controller\ControllerResolver::getController()
- 10 core/lib/Drupal/Core/Controller/ControllerResolver.php \Drupal\Core\Controller\ControllerResolver::getController()
File
-
core/
lib/ Drupal/ Core/ Controller/ ControllerResolver.php, line 45
Class
- ControllerResolver
- ControllerResolver to enhance controllers beyond Symfony's basic handling.
Namespace
Drupal\Core\ControllerCode
public function getController(Request $request) : callable|false {
if (!($controller = $request->attributes
->get('_controller'))) {
return FALSE;
}
return $this->getControllerFromDefinition($controller, $request->getPathInfo());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.