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