Elgg  Version 5.0
foot.php
Go to the documentation of this file.
1 <?php
2 
3 echo elgg_format_element('script', [], elgg_view('initialize_elgg.js', $vars));
4 
6 foreach ($js as $resource) {
7  $options = [
8  'src' => $resource->url,
9  ];
10 
11  if (!empty($resource->integrity)) {
12  $options['integrity'] = $resource->integrity;
13  $options['crossorigin'] = 'anonymous';
14  }
15 
16  echo elgg_format_element('script', $options);
17 }
18 
19 $deps = _elgg_services()->amdConfig->getDependencies();
20 ?>
21 <script>
22 require(<?= json_encode($deps, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT); ?>);
23 </script>
$resource
$js
Definition: foot.php:5
$options
Elgg admin footer.
Definition: footer.php:6
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:177
foreach($js as $resource) $deps
Definition: foot.php:19
_elgg_services()
Get the global service provider.
Definition: elgglib.php:346
elgg_get_loaded_external_resources(string $type, string $location)
Get external resource descriptors.
$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