Elgg  Version 6.1
ajax_loader.php
Go to the documentation of this file.
1 <?php
11 
12 if (isset($vars['id'])) {
13  $attributes['id'] = elgg_extract('id', $vars);
14 }
15 
16 $attributes['class'] = elgg_extract_class($vars, 'elgg-ajax-loader');
17 
18 if (elgg_extract('hidden', $vars, true)) {
19  $attributes['class'][] = 'hidden';
20 }
21 
22 echo elgg_format_element('div', $attributes);
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
$vars
Definition: theme.php:5
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145
elgg_extract_class(array $array, array|string $existing=[], string $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.
Definition: elgglib.php:279
$attributes
Elgg AJAX loader.
Definition: ajax_loader.php:10