FormState::$temporary
Same name in other branches
- 9 core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::temporary
- 8.9.x core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::temporary
- 11.x 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 441
Class
- FormState
- Stores information about the state of a form.
Namespace
Drupal\Core\FormCode
protected $temporary = [];
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.