You are here

protected function HtmlFormController::getFormObject in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Controller/HtmlFormController.php \Drupal\Core\Controller\HtmlFormController::getFormObject()

Returns the object used to build the form.

Parameters

\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match.

string $form_arg: Either a class name or a service ID.

Return value

\Drupal\Core\Form\FormInterface The form object to use.

Overrides FormController::getFormObject

File

core/lib/Drupal/Core/Controller/HtmlFormController.php, line 51
Contains \Drupal\Core\Controller\HtmlFormController.

Class

HtmlFormController
Wrapping controller for forms that serve as the main page body.

Namespace

Drupal\Core\Controller

Code

protected function getFormObject(RouteMatchInterface $route_match, $form_arg) {
  return $this->classResolver
    ->getInstanceFromDefinition($form_arg);
}