public function ParamConverterManager::addConverter

Adds a converter to the paramconverter service.

Parameters

\Drupal\Core\ParamConverter\ParamConverterInterface $converter: The converter to add.

See also

\Drupal\Core\DependencyInjection\Compiler\RegisterParamConvertersPass

File

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

Class

ParamConverterManager
Provides a service which allows to enhance (say alter) the arguments coming from the URL.

Namespace

Drupal\Core\ParamConverter

Code

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