public ControllerResolverInterface::getControllerFromDefinition($controller)
Returns the Controller instance with a given controller route definition.
As several resolvers can exist for a single application, a resolver must return false when it is not able to determine the controller.
Parameters
mixed $controller: The controller attribute like in $request->attributes->get('_controller')
Return value
mixed|bool A PHP callable representing the Controller, or false if this resolver is not able to determine the controller
Throws
\InvalidArgumentException|\LogicException Thrown if the controller can't be found.
See also
\Symfony\Component\HttpKernel\Controller\ControllerResolverInterface::getController()
File
- core/lib/Drupal/Core/Controller/ControllerResolverInterface.php, line 30
Class
- ControllerResolverInterface
- Extends the ControllerResolverInterface from symfony.
Namespace
Drupal\Core\Controller
Code
public function getControllerFromDefinition($controller);
Please login to continue.