ParamConverterManager::addConverter

public ParamConverterManager::addConverter(ParamConverterInterface $param_converter, $id)

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 26

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;
}
doc_Drupal
2016-10-29 09:33:08
Comments
Leave a Comment

Please login to continue.