new type API

This commit is contained in:
Roland Gruber 2016-12-26 19:28:34 +01:00
parent cbdd69f7f6
commit 294ab941b1
5 changed files with 15 additions and 5 deletions

View File

@ -115,7 +115,9 @@ class toolFileUpload implements \LAMTool {
* @return boolean visible
*/
function isVisible() {
return (sizeof($_SESSION['config']->get_ActiveTypes()) > 0);
$typeManager = new \LAM\TYPES\TypeManager();
$types = $typeManager->getConfiguredTypes();
return (sizeof($types) > 0);
}
/**

View File

@ -115,7 +115,9 @@ class toolOUEditor implements \LAMTool {
* @return boolean visible
*/
function isVisible() {
return (sizeof($_SESSION['config']->get_ActiveTypes()) > 0);
$typeManager = new \LAM\TYPES\TypeManager();
$types = $typeManager->getConfiguredTypes();
return (sizeof($types) > 0);
}
/**

View File

@ -115,7 +115,9 @@ class toolPDFEditor implements \LAMTool {
* @return boolean visible
*/
function isVisible() {
return (sizeof($_SESSION['config']->get_ActiveTypes()) > 0);
$typeManager = new \LAM\TYPES\TypeManager();
$types = $typeManager->getConfiguredTypes();
return (sizeof($types) > 0);
}
/**

View File

@ -115,7 +115,9 @@ class toolProfileEditor implements \LAMTool {
* @return boolean visible
*/
function isVisible() {
return (sizeof($_SESSION['config']->get_ActiveTypes()) > 0);
$typeManager = new \LAM\TYPES\TypeManager();
$types = $typeManager->getConfiguredTypes();
return (sizeof($types) > 0);
}
/**

View File

@ -128,7 +128,9 @@ class toolTests implements \LAMTool {
* @return boolean visible
*/
function isVisible() {
return (sizeof($_SESSION['config']->get_ActiveTypes()) > 0);
$typeManager = new \LAM\TYPES\TypeManager();
$types = $typeManager->getConfiguredTypes();
return (sizeof($types) > 0);
}
/**