function FormController::getFormArgument

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Controller/FormController.php \Drupal\Core\Controller\FormController::getFormArgument()
  2. 10 core/lib/Drupal/Core/Controller/FormController.php \Drupal\Core\Controller\FormController::getFormArgument()
  3. 8.9.x core/lib/Drupal/Core/Controller/FormController.php \Drupal\Core\Controller\FormController::getFormArgument()

Extracts the form argument string from a request.

Depending on the type of form the argument string may be stored in a different request attribute.

One example of a route definition is given below.

defaults:
_form:
Drupal\example\Form\ExampleForm;

Parameters

\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match object from which to extract a form definition string.

Return value

string The form definition string.

1 method overrides FormController::getFormArgument()
LayoutBuilderHtmlEntityFormController::getFormArgument in core/modules/layout_builder/src/Controller/LayoutBuilderHtmlEntityFormController.php
Extracts the form argument string from a request.

File

core/lib/Drupal/Core/Controller/FormController.php, line 94

Class

FormController
Common base class for form interstitial controllers.

Namespace

Drupal\Core\Controller

Code

abstract protected function getFormArgument(RouteMatchInterface $route_match);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.