Skip to content
Snippets Groups Projects
Commit e822d844 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Fixes for modules/portal

parent 97d50e54
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
* Hook to inject HTML content into all pages...
*
* @param array &$hookinfo hookinfo
* @return void
*/
function portal_hook_htmlinject(&$hookinfo)
{
......
......@@ -4,15 +4,28 @@ namespace SimpleSAML\Module\portal;
class Portal
{
/** @var array */
private $pages;
/** @var array|null */
private $config;
/**
* @param array $pages
* @param array|null $config
*/
public function __construct($pages, $config = null)
{
$this->pages = $pages;
$this->config = $config;
}
/**
* @param string $thispage
* @return array|null
*/
public function getTabset($thispage)
{
if (!isset($this->config)) {
......@@ -26,6 +39,11 @@ class Portal
return null;
}
/**
* @param string $thispage
* @return bool
*/
public function isPortalized($thispage)
{
foreach ($this->config as $set) {
......@@ -36,6 +54,12 @@ class Portal
return false;
}
/**
* @param \SimpleSAML\Locate\Translate $translator
* @param string $thispage
* @return array
*/
public function getLoginInfo($translator, $thispage)
{
$info = ['info' => '', 'translator' => $translator, 'thispage' => $thispage];
......@@ -43,6 +67,11 @@ class Portal
return $info['info'];
}
/**
* @param string
* @return string
*/
public function getMenu($thispage)
{
$config = \SimpleSAML\Configuration::getInstance();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment