Registers the 'type' of route parameter names that match an entity type.
@todo Matching on parameter *name* is not ideal, because it breaks encapsulation: parameter names are local to the controller and route, and controllers and routes can't be expected to know what all possible entity types might exist across all modules in order to pick names that don't conflict. Instead, the 'type' should be determined from introspecting what kind of PHP variable (e.g., a type hinted interface) the controller requires: https://www.drupal.org/node/2041907.
Name | Modifiers | Type | Description |
---|---|---|---|
EntityRouteAlterSubscriber::$resolverManager | protected | property | The entity resolver manager. |
EntityRouteAlterSubscriber::getSubscribedEvents | static | function | Returns an array of event names this subscriber wants to listen to. Overrides EventSubscriberInterface::getSubscribedEvents |
EntityRouteAlterSubscriber::onRoutingRouteAlterSetType | public | function | Applies parameter converters to route parameters. |
EntityRouteAlterSubscriber::__construct | public | function | Constructs an EntityRouteAlterSubscriber instance. |
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!EventSubscriber!EntityRouteAlterSubscriber.php/class/EntityRouteAlterSubscriber/8.1.x