Elgg  Version 3.0
item_deps.php
Go to the documentation of this file.
1 <?php
2 
13 if (!$item instanceof ElggMenuItem) {
14  return;
15 }
16 
17 $deps = $item->getDeps();
18 
19 if (elgg_extract('data-toggle', $item->getValues())) {
20  $deps[] = 'navigation/menu/elements/item_toggle';
21 }
22 
23 foreach ($deps as $module) {
24  elgg_require_js($module);
25 }
$module
Definition: login_box.php:11
$item
Definition: item_deps.php:12
elgg_require_js($name)
Request that Elgg load an AMD module onto the page.
Definition: elgglib.php:168
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:1131
if(!$item instanceof ElggMenuItem) $deps
Definition: item_deps.php:17
$vars['type']
Definition: save.php:11