function ContainerInfoController::parameterDetail

Same name in other branches
  1. 5.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 246

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);
}