summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2014-06-13 02:56:52 (GMT)
committerwebchick2014-06-13 02:56:52 (GMT)
commitb20ae794ed1fe336938df3e4dab422e3511046e4 (patch)
treeea8611020e0cdcc0cce4cd5d0fba3da84983a184
parent9f47a87405345c24b55bf0d3b1b6935480e2f419 (diff)
Issue #2151821 by joelpittet, JacobSanford, jjcarrion, rteijeiro, c4rl, IshaDakota, pplantinga, gnuget, longwave, jeanfei, sbudker1: Convert theme_system_config_form() to Twig
-rw-r--r--core/modules/system/system.module17
-rw-r--r--core/modules/system/templates/system-config-form.html.twig17
2 files changed, 18 insertions, 16 deletions
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 7fbfd99..ac44ab5 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -177,6 +177,7 @@ function system_theme() {
),
'system_config_form' => array(
'render element' => 'form',
+ 'template' => 'system-config-form',
),
'confirm_form' => array(
'render element' => 'form',
@@ -1707,22 +1708,6 @@ function system_block_view_system_help_block_alter(array &$build, BlockPluginInt
}
/**
- * Returns HTML for a system settings form.
- *
- * By default this does not alter the appearance of a form at all,
- * but is provided as a convenience for themers.
- *
- * @param $variables
- * An associative array containing:
- * - form: A render element representing the form.
- *
- * @ingroup themeable
- */
-function theme_system_config_form($variables) {
- return drupal_render_children($variables['form']);
-}
-
-/**
* Implements hook_path_update().
*/
function system_path_update() {
diff --git a/core/modules/system/templates/system-config-form.html.twig b/core/modules/system/templates/system-config-form.html.twig
new file mode 100644
index 0000000..51e6fc7
--- /dev/null
+++ b/core/modules/system/templates/system-config-form.html.twig
@@ -0,0 +1,17 @@
+{#
+/**
+ * @file
+ * Default theme implementation for a system settings form.
+ *
+ * This template will be used when a system config form specifies 'config_form'
+ * as its #theme callback. Otherwise, by default, system config forms will be
+ * themed by theme_form(). This does not alter the appearance of a form at all,
+ * but is provided as a convenience for themers.
+ *
+ * Available variables:
+ * - form: The confirm form.
+ *
+ * @ingroup themeable
+ */
+#}
+{{ form }}