Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
ajax_loader.php
Go to the documentation of this file.
1 <?php
13 $attributes = array();
14 
15 if (isset($vars['id'])) {
16  $attributes['id'] = $vars['id'];
17 }
18 
19 $class = 'elgg-ajax-loader';
20 if (isset($vars['class'])) {
21  $class = "$class {$vars['class']}";
22 }
23 
24 if (elgg_extract('hidden', $vars, true)) {
25  $class = "$class hidden";
26 }
27 
28 $attributes['class'] = $class;
29 
31 
32 $loader = <<< END
33 
34 <div $attrs></div>
35 
36 END;
37 
38 echo $loader;
if(isset($vars['id'])) $class
Definition: ajax_loader.php:19
$vars['entity']
elgg_format_attributes(array $attrs=array())
Converts an associative array into a string of well-formed HTML/XML attributes Returns a concatenated...
Definition: output.php:139
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1310
$attrs
Definition: ajax_loader.php:30
$attributes
Definition: ajax_loader.php:13
$loader
Definition: ajax_loader.php:32