Elgg  Version 5.0
footer.php
Go to the documentation of this file.
1 <?php
11 $footer = (string) elgg_extract('footer', $vars);
12 
13 // add automatic sticky form support
14 $form_vars = (array) elgg_extract('form_vars', $vars);
15 if ((bool) elgg_extract('sticky_enabled', $form_vars, false)) {
17  '#type' => 'hidden',
18  'name' => '_elgg_sticky_form_name',
19  'value' => (string) elgg_extract('sticky_form_name', $form_vars),
20  ]);
21 
22  $ignored_fields = (array) elgg_extract('sticky_ignored_fields', $form_vars);
23  if (!empty($ignored_fields)) {
25  '#type' => 'hidden',
26  'name' => '_elgg_sticky_ignored_fields',
27  'value' => implode(',', $ignored_fields),
28  ]);
29  }
30 }
31 
32 if (empty($footer)) {
33  return;
34 }
35 
36 echo elgg_format_element('div', [
37  'class' => 'elgg-foot elgg-form-footer',
38 ], $footer);
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1133
$footer
Wrap form footer.
Definition: footer.php:11
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:254
$form_vars
Definition: footer.php:14
$vars['head']
Definition: html.php:24
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145