ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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. More...
 
static isTypePlugin ($a_type, $a_active_status=true)
 Checks whether a repository type is a plugin or not. More...
 
static isTypePluginWithLP ($a_type, $a_active_status=true)
 Check whether a repository type is a plugin which has active learning progress. More...
 

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

◆ addCreatableSubObjects()

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 $DIC, array, and IL_COMP_SERVICE.

17  {
18  global $DIC;
19 
20  $ilPluginAdmin = $DIC["ilPluginAdmin"];
21  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "Repository", "robj");
22  foreach ($pl_names as $pl) {
23  $pl_id = $ilPluginAdmin->getId(IL_COMP_SERVICE, "Repository", "robj", $pl);
24  if ($pl_id != "") {
25  $a_obj_array[$pl_id] = array("name" => $pl_id, "lng" => $pl_id, "plugin" => true);
26  }
27  }
28 
29  return $a_obj_array;
30  }
global $DIC
Definition: saml.php:7
Create styles array
The data for the language used.
const IL_COMP_SERVICE

◆ isTypePlugin()

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 $a_type, $DIC, IL_COMP_SERVICE, and ilPlugin\lookupNameForId().

36  {
37  global $DIC;
38 
39  $ilPluginAdmin = $DIC["ilPluginAdmin"];
40 
41  include_once("./Services/Component/classes/class.ilPlugin.php");
42  $pname = ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $a_type);
43  if ($pname == "") {
44  return false;
45  }
46 
47  if ($ilPluginAdmin->exists(IL_COMP_SERVICE, "Repository", "robj", $pname)) {
48  if (!$a_active_status ||
49  $ilPluginAdmin->isActive(IL_COMP_SERVICE, "Repository", "robj", $pname)) {
50  return true;
51  }
52  }
53  return false;
54  }
global $DIC
Definition: saml.php:7
$a_type
Definition: workflow.php:92
static lookupNameForId($a_ctype, $a_cname, $a_slot_id, $a_plugin_id)
Lookup name for id.
const IL_COMP_SERVICE
+ Here is the call graph for this function:

◆ isTypePluginWithLP()

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 63 of file class.ilRepositoryObjectPluginSlot.php.

References $a_type, $DIC, IL_COMP_SERVICE, and ilPlugin\lookupNameForId().

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

64  {
65  global $DIC;
66 
67  $ilPluginAdmin = $DIC["ilPluginAdmin"];
68 
69  include_once("./Services/Component/classes/class.ilPlugin.php");
70  $pname = ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $a_type);
71  if ($pname == "") {
72  return false;
73  }
74 
75  if ($ilPluginAdmin->exists(IL_COMP_SERVICE, "Repository", "robj", $pname)) {
76  if (!$a_active_status ||
77  $ilPluginAdmin->isActive(IL_COMP_SERVICE, "Repository", "robj", $pname)) {
78  if ($ilPluginAdmin->hasLearningProgress(IL_COMP_SERVICE, "Repository", "robj", $pname)) {
79  return true;
80  }
81  }
82  }
83  return false;
84  }
global $DIC
Definition: saml.php:7
$a_type
Definition: workflow.php:92
static lookupNameForId($a_ctype, $a_cname, $a_slot_id, $a_plugin_id)
Lookup name for id.
const IL_COMP_SERVICE
+ 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: