ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilRepositoryObjectPluginSlot Class Reference

Helper methods for repository object plugins. More...

+ Collaboration diagram for ilRepositoryObjectPluginSlot:

Static Public Member Functions

static addCreatableSubObjects ($a_obj_array)
 Adds objects that can be created to the add new object list array.
static isTypePlugin ($a_type, $a_active_status=true)
 Checks whether a repository type is a plugin or not.
static isTypePluginWithLP ($a_type, $a_active_status=true)
 Check whether a repository type is a plugin which has active learning progress.

Detailed Description

Helper methods for repository object plugins.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 11 of file class.ilRepositoryObjectPluginSlot.php.

Member Function Documentation

static ilRepositoryObjectPluginSlot::addCreatableSubObjects (   $a_obj_array)
static

Adds objects that can be created to the add new object list array.

Definition at line 16 of file class.ilRepositoryObjectPluginSlot.php.

References IL_COMP_SERVICE.

{
global $ilPluginAdmin;
$pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "Repository", "robj");
foreach ($pl_names as $pl)
{
$pl_id = $ilPluginAdmin->getId(IL_COMP_SERVICE, "Repository", "robj", $pl);
if ($pl_id != "")
{
$a_obj_array[$pl_id] = array("name" => $pl_id, "lng" => $pl_id, "plugin" => true);
}
}
return $a_obj_array;
}
static ilRepositoryObjectPluginSlot::isTypePlugin (   $a_type,
  $a_active_status = true 
)
static

Checks whether a repository type is a plugin or not.

Definition at line 35 of file class.ilRepositoryObjectPluginSlot.php.

References IL_COMP_SERVICE, and ilPlugin\lookupNameForId().

{
global $ilPluginAdmin;
include_once("./Services/Component/classes/class.ilPlugin.php");
$pname = ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $a_type);
if ($pname == "")
{
return false;
}
if ($ilPluginAdmin->exists(IL_COMP_SERVICE, "Repository", "robj", $pname))
{
if (!$a_active_status ||
$ilPluginAdmin->isActive(IL_COMP_SERVICE, "Repository", "robj", $pname))
{
return true;
}
}
return false;
}

+ Here is the call graph for this function:

static ilRepositoryObjectPluginSlot::isTypePluginWithLP (   $a_type,
  $a_active_status = true 
)
static

Check whether a repository type is a plugin which has active learning progress.

Parameters
string$a_type
bool$a_active_status
Returns
boolean

Definition at line 64 of file class.ilRepositoryObjectPluginSlot.php.

References IL_COMP_SERVICE, and ilPlugin\lookupNameForId().

Referenced by ilLPCollectionOfRepositoryObjects\getPossibleItems(), ilLPTableBaseGUI\getPossibleTypes(), and ilPluginLP\initPlugin().

{
global $ilPluginAdmin;
include_once("./Services/Component/classes/class.ilPlugin.php");
$pname = ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $a_type);
if ($pname == "")
{
return false;
}
if ($ilPluginAdmin->exists(IL_COMP_SERVICE, "Repository", "robj", $pname))
{
if (!$a_active_status ||
$ilPluginAdmin->isActive(IL_COMP_SERVICE, "Repository", "robj", $pname))
{
if($ilPluginAdmin->hasLearningProgress(IL_COMP_SERVICE, "Repository", "robj", $pname))
{
return true;
}
}
}
return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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