pages = $pages; $this->config = $config; } function getTabset($thispage) { if (!isset($this->config)) return NULL; foreach($this->config AS $set) { if (in_array($thispage, $set)) { return $set; } } return NULL; } function isPortalized($thispage) { foreach($this->config AS $set) { if (in_array($thispage, $set)) { return TRUE; } } return FALSE; } function getLoginInfo($t, $thispage) { $info = array('info' => '', 'template' => $t, 'thispage' => $thispage); SimpleSAML\Module::callHooks('portalLoginInfo', $info); return $info['info']; } function getMenu($thispage) { $config = SimpleSAML_Configuration::getInstance(); $t = new SimpleSAML_XHTML_Template($config, 'sanitycheck:check.tpl.php'); $tabset = $this->getTabset($thispage); $logininfo = $this->getLoginInfo($t, $thispage); $text = ''; $text .= '
'; if (!empty($logininfo)) { $text .= '' . $logininfo . '
'; } return $text; } }