Elgg  Version 6.1
search.php
Go to the documentation of this file.
1 <?php
9 $additional_search_fields = (array) elgg_extract('additional_search_fields', $vars, []);
11  echo elgg_view_field($field);
12 }
13 
14 echo elgg_view_field([
15  '#type' => 'fieldset',
16  'fields' => [
17  [
18  '#type' => 'search',
19  '#class' => 'elgg-field-stretch',
20  'name' => 'q',
21  'aria-label' => elgg_echo('search'), // because we don't have a #label
22  'placeholder' => elgg_echo('search'),
23  'value' => get_input('q'),
24  ],
25  [
26  '#type' => 'submit',
27  'text' => elgg_echo('search'),
28  ],
29  ],
30  'align' => 'horizontal',
31 ]);
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1112
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
if(elgg_extract('input_type', $vars)) if(elgg_extract('required', $vars)) if(elgg_extract('disabled', $vars)) $field
Definition: field.php:42
get_input(string $variable, $default=null, bool $filter_result=true)
Parameter input functions.
Definition: input.php:20
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:256
$additional_search_fields
Search form used on admin user listings.
Definition: search.php:9
$vars['class']
Elgg search input Displays a search input field.
Definition: search.php:7