You are here

protected function FormBase::getRequest in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Form/FormBase.php \Drupal\Core\Form\FormBase::getRequest()

Gets the request object.

Return value

\Symfony\Component\HttpFoundation\Request $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.

... See full list

File

core/lib/Drupal/Core/Form/FormBase.php, line 141
Contains \Drupal\Core\Form\FormBase.

Class

FormBase
Provides a base class for forms.

Namespace

Drupal\Core\Form

Code

protected function getRequest() {
  if (!$this->requestStack) {
    $this->requestStack = \Drupal::service('request_stack');
  }
  return $this->requestStack
    ->getCurrentRequest();
}