function FormController::getFormObject
Same name in other branches
- 9 core/lib/Drupal/Core/Controller/FormController.php \Drupal\Core\Controller\FormController::getFormObject()
- 10 core/lib/Drupal/Core/Controller/FormController.php \Drupal\Core\Controller\FormController::getFormObject()
- 11.x core/lib/Drupal/Core/Controller/FormController.php \Drupal\Core\Controller\FormController::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.
1 call to FormController::getFormObject()
- FormController::getContentResult in core/
lib/ Drupal/ Core/ Controller/ FormController.php - Invokes the form and returns the result.
2 methods override FormController::getFormObject()
- HtmlEntityFormController::getFormObject in core/
lib/ Drupal/ Core/ Entity/ HtmlEntityFormController.php - Instead of a class name or service ID, $form_arg will be a string representing the entity and operation being performed. Consider the following route:
- HtmlFormController::getFormObject in core/
lib/ Drupal/ Core/ Controller/ HtmlFormController.php - Returns the object used to build the form.
File
-
core/
lib/ Drupal/ Core/ Controller/ FormController.php, line 125
Class
- FormController
- Common base class for form interstitial controllers.
Namespace
Drupal\Core\ControllerCode
protected abstract function getFormObject(RouteMatchInterface $route_match, $form_arg);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.