public function PluginTypeConverter::doConvert in Plugin 8.2
Converts path variables to their corresponding objects.
Parameters
mixed $value: The raw value.
mixed[] $converter_definition: The converter definition provided in the route options.
Return value
mixed|null The converted parameter value.
Throws
\Exception
Overrides PluginTypeBasedConverterTrait::doConvert
File
- src/
ParamConverter/ PluginTypeConverter.php, line 44
Class
- PluginTypeConverter
- Converts plugin type IDs in route parameters to plugin types.
Namespace
Drupal\plugin\ParamConverterCode
public function doConvert($plugin_type_id, array $converter_definition) {
if ($this->pluginTypeManager
->hasPluginType($plugin_type_id)) {
return $this->pluginTypeManager
->getPluginType($plugin_type_id);
}
return NULL;
}