You are here

public function ContainerInfoController::parameterDetail in Devel 8

Same name and namespace in other branches
  1. 8.3 src/Controller/ContainerInfoController.php \Drupal\devel\Controller\ContainerInfoController::parameterDetail()
  2. 8.2 src/Controller/ContainerInfoController.php \Drupal\devel\Controller\ContainerInfoController::parameterDetail()
  3. 4.x src/Controller/ContainerInfoController.php \Drupal\devel\Controller\ContainerInfoController::parameterDetail()

Returns a render array representation of the parameter value.

Parameters

string $parameter_name: The name of the parameter to retrieve.

Return value

array A render array containing the parameter value.

Throws

\Symfony\Component\HttpKernel\Exception\NotFoundHttpException If the requested parameter is not defined.

1 string reference to 'ContainerInfoController::parameterDetail'
devel.routing.yml in ./devel.routing.yml
devel.routing.yml

File

src/Controller/ContainerInfoController.php, line 263

Class

ContainerInfoController
Provides route responses for the container info pages.

Namespace

Drupal\devel\Controller

Code

public function parameterDetail($parameter_name) {
  try {
    $parameter = $this->container
      ->getParameter($parameter_name);
  } catch (ParameterNotFoundException $e) {
    throw new NotFoundHttpException();
  }
  return $this->dumper
    ->exportAsRenderable($parameter);
}