ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
hook_htmlinject.php
Go to the documentation of this file.
1 <?php
2 
9  assert(is_array($hookinfo));
10  assert(array_key_exists('pre', $hookinfo));
11  assert(array_key_exists('post', $hookinfo));
12  assert(array_key_exists('page', $hookinfo));
13 
14  $links = array('links' => array());
16 
17  $portalConfig = SimpleSAML_Configuration::getOptionalConfig('module_portal.php');
18 
19  $allLinks = array();
20  foreach($links AS $ls) {
21  $allLinks = array_merge($allLinks, $ls);
22  }
23 
24  $pagesets = $portalConfig->getValue('pagesets', array(
25  array('frontpage_welcome', 'frontpage_config', 'frontpage_auth', 'frontpage_federation'),
26  ));
27  SimpleSAML\Module::callHooks('portalextras', $pagesets);
28  $portal = new sspmod_portal_Portal($allLinks, $pagesets);
29 
30  if (!$portal->isPortalized($hookinfo['page'])) return;
31 
32  // Include jquery UI CSS files in header
33  $hookinfo['jquery']['css'] = TRUE;
34 
35  // Header
36  $hookinfo['pre'][] = '<div id="portalmenu" class="ui-tabs ui-widget ui-widget-content ui-corner-all">' .
37  $portal->getMenu($hookinfo['page']) .
38  '<div id="portalcontent" class="ui-tabs-panel ui-widget-content ui-corner-bottom">';
39 
40  // Footer
41  $hookinfo['post'][] = '</div></div>';
42 
43 }
$allLinks
static callHooks($hook, &$data=null)
Call a hook in all enabled modules.
Definition: Module.php:281
portal_hook_htmlinject(&$hookinfo)
Hook to inject HTML content into all pages...
static getOptionalConfig($filename='config.php', $configSet='simplesaml')
Load a configuration file from a configuration set.
$links
$hookinfo
Definition: index.php:7