public function EntityResolverManager::setRouteOptions in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/EntityResolverManager.php \Drupal\Core\Entity\EntityResolverManager::setRouteOptions()
- 9 core/lib/Drupal/Core/Entity/EntityResolverManager.php \Drupal\Core\Entity\EntityResolverManager::setRouteOptions()
Set the upcasting route objects.
Parameters
\Symfony\Component\Routing\Route $route: The route object to add the upcasting information onto.
File
- core/
lib/ Drupal/ Core/ Entity/ EntityResolverManager.php, line 211
Class
- EntityResolverManager
- Sets the entity route parameter converter options automatically.
Namespace
Drupal\Core\EntityCode
public function setRouteOptions(Route $route) {
if ($controller = $this
->getControllerClass($route
->getDefaults())) {
// Try to use reflection.
if ($this
->setParametersFromReflection($controller, $route)) {
return;
}
}
// Try to use _entity_* information on the route.
$this
->setParametersFromEntityInformation($route);
}