summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2013-05-24 17:03:09 (GMT)
committerAlex Pott2013-05-24 17:03:09 (GMT)
commit67b166ca27f110ef2724b6cf5a00d49a10375323 (patch)
treeee8c4d5aee9979d5b6c6d5cac79648c188f2aca5
parent21da6fb4952678dbd88d44206b475da086ac2b3b (diff)
Issue #1898454 by c4rl, gnuget, Hydra, mr.baileys, Sean Charles, joelpittet: system.module - Convert PHPTemplate templates to Twig.
-rw-r--r--core/modules/system/system.module14
-rw-r--r--core/modules/system/templates/system-plugin-ui-form.html.twig31
-rw-r--r--core/modules/system/templates/system-plugin-ui-form.tpl.php32
3 files changed, 38 insertions, 39 deletions
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 0d472e5..b3ea764 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -2683,16 +2683,16 @@ function system_preprocess_block(&$variables) {
}
/**
- * Implements hook_preprocess_HOOK() for system-plugin-ui-form.tpl.php.
+ * Prepares variables for system plugin UI form templates.
*
- * The $variables array contains the following arguments:
- * - $form
- */
+ * Default template: system-plugin-ui-form.html.twig.
+ *
+ * @param array $variables
+ * An associative array containing:
+ * - form: The plugin form elements.
+*/
function template_preprocess_system_plugin_ui_form(&$variables) {
drupal_add_css(drupal_get_path('module', 'system') . '/system.plugin.ui.css');
- $variables['left'] = drupal_render($variables['form']['left']);
- $variables['right'] = drupal_render($variables['form']['right']);
- $variables['form_submit'] = drupal_render_children($variables['form']);
}
/**
diff --git a/core/modules/system/templates/system-plugin-ui-form.html.twig b/core/modules/system/templates/system-plugin-ui-form.html.twig
new file mode 100644
index 0000000..415a6bf
--- /dev/null
+++ b/core/modules/system/templates/system-plugin-ui-form.html.twig
@@ -0,0 +1,31 @@
+{#
+/**
+ * @file
+ * Default theme implementation to configure blocks.
+ *
+ * Available variables:
+ * - form: The form elements which contains:
+ * - left: Form elements that appear in the left column.
+ * - right: Form elements that appear in the right column.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_system_plugin_ui_form()
+ *
+ * @ingroup themeable
+ */
+#}
+<div id="block-library" class="container">
+ <div class="left-col">
+ <div class="inside">
+ {{ form.left }}
+ </div>
+ </div>
+ <div class="right-col">
+ <div class="inside">
+ {{ form.right }}
+ </div>
+ </div>
+ {% if form -%}
+ <div class="bottom-bar">{{ form }}</div>
+ {%- endif -%}
+</div>
diff --git a/core/modules/system/templates/system-plugin-ui-form.tpl.php b/core/modules/system/templates/system-plugin-ui-form.tpl.php
deleted file mode 100644
index 8179076..0000000
--- a/core/modules/system/templates/system-plugin-ui-form.tpl.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-/**
- * @file
- * Default theme implementation to configure blocks.
- *
- * Available variables:
- * - $left: Any form array elements that should appear in the left hand column.
- * - $right: Any form array elements that should appear in the right hand column.
- * - $form_submit: Form submit button.
- *
- * @see template_preprocess_block_library_form()
- * @see theme_block_library_form()
- *
- * @ingroup themeable
- */
-?>
-<div id="block-library" class="container">
- <div class="left-col">
- <div class="inside">
- <?php print $left; ?>
- </div>
- </div>
- <div class="right-col">
- <div class="inside">
- <?php print $right; ?>
- </div>
- </div>
- <?php if ($form_submit) { ?>
- <div class="bottom-bar"><?php print $form_submit; ?></div>
- <?php } ?>
-</div>