X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fctools%2Ftests%2Fmodules%2Fctools_wizard_test%2Fsrc%2FForm%2FExampleConfigEntityGeneralForm.php;fp=web%2Fmodules%2Fcontrib%2Fctools%2Ftests%2Fmodules%2Fctools_wizard_test%2Fsrc%2FForm%2FExampleConfigEntityGeneralForm.php;h=6120342e9d736aa69912d54370c543b2e4253ed0;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/web/modules/contrib/ctools/tests/modules/ctools_wizard_test/src/Form/ExampleConfigEntityGeneralForm.php b/web/modules/contrib/ctools/tests/modules/ctools_wizard_test/src/Form/ExampleConfigEntityGeneralForm.php new file mode 100644 index 000000000..6120342e9 --- /dev/null +++ b/web/modules/contrib/ctools/tests/modules/ctools_wizard_test/src/Form/ExampleConfigEntityGeneralForm.php @@ -0,0 +1,46 @@ +getTemporaryValue('wizard'); + /** @var $page \Drupal\ctools_wizard_test\Entity\ExampleConfigEntity */ + $config_entity = $cached_values['ctools_wizard_test_config_entity']; + + // The label and id will be added by the EntityFormWizardBase. + + return $form; + } + + /** + * {@inheritdoc} + */ + public function submitForm(array &$form, FormStateInterface $form_state) { + $cached_values = $form_state->getTemporaryValue('wizard'); + /** @var $page \Drupal\ctools_wizard_test\Entity\ExampleConfigEntity */ + $config_entity = $cached_values['ctools_wizard_test_config_entity']; + + $config_entity->set('id', $form_state->getValue('id')); + $config_entity->set('label', $form_state->getValue('label')); + } + +}