ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilRepositoryObjectPluginSlot.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
12 {
16  static function addCreatableSubObjects($a_obj_array)
17  {
18  global $ilPluginAdmin;
19  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "Repository", "robj");
20  foreach ($pl_names as $pl)
21  {
22  $pl_id = $ilPluginAdmin->getId(IL_COMP_SERVICE, "Repository", "robj", $pl);
23  $a_obj_array[$pl_id] = array("name" => $pl_id, "lng" => $pl_id, "plugin" => true);
24  }
25 
26  return $a_obj_array;
27  }
28 
32  static function isTypePlugin($a_type, $a_active_status = true)
33  {
34  global $ilPluginAdmin;
35 
36  include_once("./Services/Component/classes/class.ilPlugin.php");
37  $pname = ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $a_type);
38  if ($pname == "")
39  {
40  return false;
41  }
42 
43  if ($ilPluginAdmin->exists(IL_COMP_SERVICE, "Repository", "robj", $pname))
44  {
45  if (!$a_active_status ||
46  $ilPluginAdmin->isActive(IL_COMP_SERVICE, "Repository", "robj", $pname))
47  {
48  return true;
49  }
50  }
51  return false;
52  }
53 }