You are here

protected property FormState::$temporary in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::temporary

Holds temporary data accessible during the current page request only.

All $form_state properties that are not reserved keys (see other properties marked as uncacheable) persist throughout a multistep form sequence. Form API provides this key for modules to communicate information across form-related functions during a single page request. It may be used to temporarily save data that does not need to or should not be cached during the whole form workflow; e.g., data that needs to be accessed during the current form build process only. There is no use-case for this functionality in Drupal core.

This property is uncacheable.

Type: array

File

core/lib/Drupal/Core/Form/FormState.php, line 398

Class

FormState
Stores information about the state of a form.

Namespace

Drupal\Core\Form

Code

protected $temporary = [];