function FormController::getFormObject
Same name in other branches
- 9 core/lib/Drupal/Core/Controller/FormController.php \Drupal\Core\Controller\FormController::getFormObject()
- 8.9.x 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.
5 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.
- LayoutBuilderDecorationTestHtmlEntityFormController::getFormObject in core/
modules/ layout_builder/ tests/ modules/ layout_builder_decoration_test/ src/ Controller/ LayoutBuilderDecorationTestHtmlEntityFormController.php - Returns the object used to build the form.
- LayoutBuilderHtmlEntityFormController::getFormObject in core/
modules/ layout_builder/ src/ Controller/ LayoutBuilderHtmlEntityFormController.php - Returns the object used to build the form.
- WorkspacesHtmlEntityFormController::getFormObject in core/
modules/ workspaces/ src/ Controller/ WorkspacesHtmlEntityFormController.php - Returns the object used to build the form.
File
-
core/
lib/ Drupal/ Core/ Controller/ FormController.php, line 107
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.