ControllerResolver::getController

public ControllerResolver::getController(Request $request)

This method looks for a '_controller' request attribute that represents the controller name (a string like ClassName::MethodName).

Overrides ControllerResolver::getController

File

core/lib/Drupal/Core/Controller/ControllerResolver.php, line 87

Class

ControllerResolver
ControllerResolver to enhance controllers beyond Symfony's basic handling.

Namespace

Drupal\Core\Controller

Code

public function getController(Request $request) {
  if (!$controller = $request->attributes->get('_controller')) {
    return FALSE;
  }
  return $this->getControllerFromDefinition($controller, $request->getPathInfo());
}
doc_Drupal
2016-10-29 08:58:59
Comments
Leave a Comment

Please login to continue.