function FormWizardBase::populateCachedValues
Same name in other branches
- 8.x-3.x src/Wizard/FormWizardBase.php \Drupal\ctools\Wizard\FormWizardBase::populateCachedValues()
Overrides FormWizardInterface::populateCachedValues
File
-
src/
Wizard/ FormWizardBase.php, line 309
Class
- FormWizardBase
- The base class for all form wizard.
Namespace
Drupal\ctools\WizardCode
public function populateCachedValues(array &$form, FormStateInterface $form_state) {
$cached_values = $this->getTempstore()
->get($this->getMachineName());
if (!$cached_values) {
$cached_values = $form_state->getTemporaryValue('wizard');
if (!$cached_values) {
$cached_values = $this->initValues();
$form_state->setTemporaryValue('wizard', $cached_values);
}
}
}