Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ParamConverterManager.php

function ParamConverterManager::getConverter

Overrides ParamConverterManagerInterface::getConverter

File

core/lib/Drupal/Core/ParamConverter/ParamConverterManager.php, line 34

Class

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

Namespace

Drupal\Core\ParamConverter

Code

public function getConverter($converter) {
    if (isset($this->converters[$converter])) {
        return $this->converters[$converter];
    }
    else {
        throw new \InvalidArgumentException(sprintf('No converter has been registered for %s', $converter));
    }
}
RSS feed
Powered by Drupal