class EntityRevisionParamConverter
Parameter converter for upcasting entity revision IDs to full objects.
This is useful for pages which want to show a specific revision, like "/entity_example/{entity_example}/revision/{entity_example_revision}".
In order to use it you should specify some additional options in your route:
example.route: path: /foo/{entity_example_revision} options: parameters: entity_example_revision: type: entity_revision:entity_example
Hierarchy
- class \Drupal\Core\ParamConverter\EntityRevisionParamConverter implements ParamConverterInterface
File
- core/lib/Drupal/Core/ParamConverter/EntityRevisionParamConverter.php, line 25
Namespace
Drupal\Core\ParamConverterMembers
Name | Modifiers | Type | Description |
---|---|---|---|
EntityRevisionParamConverter::$entityTypeManager | protected | property | The entity type manager. |
EntityRevisionParamConverter::applies | public | function | Determines if the converter applies to a specific route and variable. Overrides ParamConverterInterface::applies |
EntityRevisionParamConverter::convert | public | function | Converts path variables to their corresponding objects. Overrides ParamConverterInterface::convert |
EntityRevisionParamConverter::__construct | public | function | Creates a new EntityRevisionParamConverter 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!ParamConverter!EntityRevisionParamConverter.php/class/EntityRevisionParamConverter/8.1.x