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 = [];
doc_Drupal
2016-10-29 09:15:52
Comments
Leave a Comment

Please login to continue.