X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fdrupalmoduleupgrader%2Ftemplates%2FForm.html.twig;fp=web%2Fmodules%2Fcontrib%2Fdrupalmoduleupgrader%2Ftemplates%2FForm.html.twig;h=86746eb1969fbdd249d37c4a5e63578d61c5cfd5;hp=0000000000000000000000000000000000000000;hb=8acec36f19c470dfcda1ae2336826a782f41874c;hpb=e0411c4e83ba0d079034db83c3f7f55be24a0e35 diff --git a/web/modules/contrib/drupalmoduleupgrader/templates/Form.html.twig b/web/modules/contrib/drupalmoduleupgrader/templates/Form.html.twig new file mode 100644 index 000000000..86746eb19 --- /dev/null +++ b/web/modules/contrib/drupalmoduleupgrader/templates/Form.html.twig @@ -0,0 +1,51 @@ +config('{{ module }}.settings'); + + foreach (Element::children($form) as $variable) { + $config->set($variable, $form_state->getValue($form[$variable]['#parents'])); + } + $config->save(); + + if (method_exists($this, '_submitForm')) { + $this->_submitForm($form, $form_state); + } + + parent::submitForm($form, $form_state); + } + + /** + * {@inheritdoc} + */ + protected function getEditableConfigNames() { + return ['{{ module }}.settings']; + } + {% endif %} + +} +?>