You are here

public function ParamConverterManager::addConverter in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/ParamConverter/ParamConverterManager.php \Drupal\Core\ParamConverter\ParamConverterManager::addConverter()

Registers a parameter converter with the manager.

Parameters

\Drupal\Core\ParamConverter\ParamConverterInterface $param_converter: The added param converter instance.

string $id: The parameter converter service id to register.

Return value

$this

Overrides ParamConverterManagerInterface::addConverter

File

core/lib/Drupal/Core/ParamConverter/ParamConverterManager.php, line 31
Contains \Drupal\Core\ParamConverter\ParamConverterManager.

Class

ParamConverterManager
Manages converter services for converting request parameters to full objects.

Namespace

Drupal\Core\ParamConverter

Code

public function addConverter(ParamConverterInterface $param_converter, $id) {
  $this->converters[$id] = $param_converter;
  return $this;
}