ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
hook_htmlinject.php File Reference

Go to the source code of this file.

Functions

 portal_hook_htmlinject (&$hookinfo)
 Hook to inject HTML content into all pages... More...
 

Function Documentation

◆ portal_hook_htmlinject()

portal_hook_htmlinject ( $hookinfo)

Hook to inject HTML content into all pages...

Parameters
array&$hookinfohookinfo

Definition at line 8 of file hook_htmlinject.php.

References $allLinks, $hookinfo, $links, array, SimpleSAML\Module\callHooks(), and SimpleSAML_Configuration\getOptionalConfig().

8  {
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:364
Create styles array
The data for the language used.
static getOptionalConfig($filename='config.php', $configSet='simplesaml')
Load a configuration file from a configuration set.
$links
$hookinfo
Definition: index.php:7
+ Here is the call graph for this function: