ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
sspmod_portal_Portal Class Reference
+ Collaboration diagram for sspmod_portal_Portal:

Public Member Functions

 __construct ($pages, $config=NULL)
 
 getTabset ($thispage)
 
 isPortalized ($thispage)
 
 getLoginInfo ($translator, $thispage)
 
 getMenu ($thispage)
 

Private Attributes

 $pages
 
 $config
 

Detailed Description

Definition at line 3 of file Portal.php.

Constructor & Destructor Documentation

◆ __construct()

sspmod_portal_Portal::__construct (   $pages,
  $config = NULL 
)

Definition at line 8 of file Portal.php.

References $config, and $pages.

8  {
9  $this->pages = $pages;
10  $this->config = $config;
11  }

Member Function Documentation

◆ getLoginInfo()

sspmod_portal_Portal::getLoginInfo (   $translator,
  $thispage 
)

Definition at line 33 of file Portal.php.

References $info, $translator, array, and SimpleSAML\Module\callHooks().

Referenced by getMenu().

33  {
34  $info = array('info' => '', 'translator' => $translator, 'thispage' => $thispage);
35  SimpleSAML\Module::callHooks('portalLoginInfo', $info);
36  return $info['info'];
37  }
static callHooks($hook, &$data=null)
Call a hook in all enabled modules.
Definition: Module.php:364
$translator
Create styles array
The data for the language used.
$info
Definition: index.php:5
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMenu()

sspmod_portal_Portal::getMenu (   $thispage)

Definition at line 39 of file Portal.php.

References $config, $name, $t, $text, SimpleSAML_Configuration\getInstance(), getLoginInfo(), and getTabset().

39  {
42  $tabset = $this->getTabset($thispage);
43  $logininfo = $this->getLoginInfo($t, $thispage);
44  $text = '';
45  $text .= '<ul class="tabset_tabs ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">';
46  foreach($this->pages AS $pageid => $page) {
47 
48  if (isset($tabset) && !in_array($pageid, $tabset, TRUE)) continue;
49  $name = 'uknown';
50  if (isset($page['text'])) $name = $page['text'];
51  if (isset($page['shorttext'])) $name = $page['shorttext'];
52 
53  if (!isset($page['href'])) {
54  $text .= '<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a href="#">' . $t->t($name) . '</a></li>';
55  } else if($pageid === $thispage ) {
56  $text .= '<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a href="#">' . $t->t($name) . '</a></li>';
57  } else {
58  $text .= '<li class="ui-state-default ui-corner-top"><a href="' . $page['href'] . '">' . $t->t($name) . '</a></li>';
59  }
60 
61  }
62  $text .= '</ul>';
63  if (!empty($logininfo)) {
64  $text .= '<p class="logininfo" style="text-align: right; margin: 0px">' . $logininfo . '</p>';
65  }
66 
67  return $text;
68  }
if($format !==null) $name
Definition: metadata.php:146
getTabset($thispage)
Definition: Portal.php:13
$text
Definition: errorreport.php:18
getLoginInfo($translator, $thispage)
Definition: Portal.php:33
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
+ Here is the call graph for this function:

◆ getTabset()

sspmod_portal_Portal::getTabset (   $thispage)

Definition at line 13 of file Portal.php.

Referenced by getMenu().

13  {
14  if (!isset($this->config)) return NULL;
15  foreach($this->config AS $set) {
16  if (in_array($thispage, $set, true)) {
17  return $set;
18  }
19  }
20  return NULL;
21  }
+ Here is the caller graph for this function:

◆ isPortalized()

sspmod_portal_Portal::isPortalized (   $thispage)

Definition at line 23 of file Portal.php.

23  {
24 
25  foreach($this->config AS $set) {
26  if (in_array($thispage, $set, true)) {
27  return TRUE;
28  }
29  }
30  return FALSE;
31  }

Field Documentation

◆ $config

sspmod_portal_Portal::$config
private

Definition at line 6 of file Portal.php.

Referenced by __construct(), and getMenu().

◆ $pages

sspmod_portal_Portal::$pages
private

Definition at line 5 of file Portal.php.

Referenced by __construct().


The documentation for this class was generated from the following file: