summaryrefslogtreecommitdiff
path: root/modules/search/search-block-form.tpl.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/search/search-block-form.tpl.php')
-rw-r--r--modules/search/search-block-form.tpl.php27
1 files changed, 12 insertions, 15 deletions
diff --git a/modules/search/search-block-form.tpl.php b/modules/search/search-block-form.tpl.php
index 6da610a53..002cc8963 100644
--- a/modules/search/search-block-form.tpl.php
+++ b/modules/search/search-block-form.tpl.php
@@ -3,32 +3,29 @@
/**
* @file
- * Default theme implementation for displaying a search form within a block
- * region.
+ * Displays the search form block.
*
* Available variables:
* - $search_form: The complete search form ready for print.
- * - $search: Array of keyed search elements. Can be used to print each form
- * element separately.
+ * - $search: Associative array of search elements. Can be used to print each
+ * form element separately.
*
- * Default keys within $search:
+ * Default elements within $search:
* - $search['search_block_form']: Text input area wrapped in a div.
- * - $search['submit']: Form submit button.
- * - $search['hidden']: Hidden form elements. Used to validate forms when submitted.
- *
- * Since $search is keyed, a direct print of the form element is possible.
- * Modules can add to the search form so it is recommended to check for their
- * existence before printing. The default keys will always exist.
+ * - $search['actions']: Rendered form buttons.
+ * - $search['hidden']: Hidden form elements. Used to validate forms when
+ * submitted.
*
+ * Modules can add to the search form, so it is recommended to check for their
+ * existence before printing. The default keys will always exist. To check for
+ * a module-provided field, use code like this:
+ * @code
* <?php if (isset($search['extra_field'])): ?>
* <div class="extra-field">
* <?php print $search['extra_field']; ?>
* </div>
* <?php endif; ?>
- *
- * To check for all available data within $search, use the code below.
- *
- * <?php print '<pre>'. check_plain(print_r($search, 1)) .'</pre>'; ?>
+ * @endcode
*
* @see template_preprocess_search_block_form()
*/