function FormBase::getRequest
Same name in other branches
- 9 core/lib/Drupal/Core/Form/FormBase.php \Drupal\Core\Form\FormBase::getRequest()
- 10 core/lib/Drupal/Core/Form/FormBase.php \Drupal\Core\Form\FormBase::getRequest()
- 11.x core/lib/Drupal/Core/Form/FormBase.php \Drupal\Core\Form\FormBase::getRequest()
Gets the request object.
Return value
\Symfony\Component\HttpFoundation\Request The request object.
6 calls to FormBase::getRequest()
- ConfirmFormBase::buildForm in core/
lib/ Drupal/ Core/ Form/ ConfirmFormBase.php - Form constructor.
- ContentEntityConfirmFormBase::actions in core/
lib/ Drupal/ Core/ Entity/ ContentEntityConfirmFormBase.php - Returns an array of supported actions for the current entity form.
- EntityConfirmFormBase::actions in core/
lib/ Drupal/ Core/ Entity/ EntityConfirmFormBase.php - Returns an array of supported actions for the current entity form.
- FieldConfigEditForm::save in core/
modules/ field_ui/ src/ Form/ FieldConfigEditForm.php - Form submission handler for the 'save' action.
- FieldStorageConfigEditForm::save in core/
modules/ field_ui/ src/ Form/ FieldStorageConfigEditForm.php - Form submission handler for the 'save' action.
File
-
core/
lib/ Drupal/ Core/ Form/ FormBase.php, line 157
Class
- FormBase
- Provides a base class for forms.
Namespace
Drupal\Core\FormCode
protected function getRequest() {
if (!$this->requestStack) {
$this->requestStack = \Drupal::service('request_stack');
}
return $this->requestStack
->getCurrentRequest();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.