Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
foot.php
Go to the documentation of this file.
1 <?php
2 
3 $elgg_init = elgg_view('initialize_elgg.js');
4 echo "<script>$elgg_init</script>";
5 
6 // TODO(evan): "head" JS and "footer" JS distinction doesn't make sense anymore
7 // TODO(evan): Introduce new "async" location for scripts allowed in head?
9 foreach ($js as $url) {
10  echo elgg_format_element('script', array('src' => $url));
11 }
12 
13 $js = elgg_get_loaded_js('footer');
14 foreach ($js as $url) {
15  echo elgg_format_element('script', array('src' => $url));
16 }
17 
18 $deps = _elgg_services()->amdConfig->getDependencies();
19 ?>
20 <script>
21 require(<?= json_encode($deps, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT); ?>);
22 </script>
$js
Definition: foot.php:8
$elgg_init
Definition: foot.php:3
$url
Definition: exceptions.php:24
elgg_format_element($tag_name, array $attributes=array(), $text= '', array $options=array())
Format an HTML element.
Definition: output.php:218
foreach($js as $url) $deps
Definition: foot.php:18
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:342
_elgg_services(\Elgg\Di\ServiceProvider $services=null)
Get the global service provider.
Definition: autoloader.php:17
elgg_get_loaded_js($location= 'head')
Get the JavaScript URLs that are loaded.
Definition: elgglib.php:245