interface ParamConverterInterface
Interface for parameter converters.
Classes implementing this interface are responsible for converting a path parameter to the object it represents.
Here is an example path: /admin/structure/block/manage/{block}
In this case, '{block}' would be the path parameter which should be turned into a block object representing the block in question.
ParamConverters are defined as services tagged with 'paramconverter', and are managed by the 'paramconverter_manager' service.
Hierarchy
- interface \Drupal\Core\ParamConverter\ParamConverterInterface
See also
\Drupal\Core\ParamConverter\ParamConverterManagerInterface
\Drupal\Core\ParamConverter\EntityConverter
File
- core/lib/Drupal/Core/ParamConverter/ParamConverterInterface.php, line 25
Namespace
Drupal\Core\ParamConverterMembers
Name | Modifiers | Type | Description |
---|---|---|---|
ParamConverterInterface::applies | public | function | Determines if the converter applies to a specific route and variable. |
ParamConverterInterface::convert | public | function | Converts path variables to their corresponding objects. |
© 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!ParamConverterInterface.php/interface/ParamConverterInterface/8.1.x