25 include_once(
"./Services/Component/classes/class.ilComponent.php");
67 private final function getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname)
71 if (!isset($this->got_data[$a_ctype][$a_cname][$a_slot_id][$a_pname]))
73 include_once
"./Services/Component/classes/class.ilPluginSlot.php";
76 $plugin_php_file =
"./Customizing/global/plugins/".$a_ctype.
"/".
77 $a_cname.
"/".$slot_name.
"/".$a_pname.
"/plugin.php";
81 if (is_file($plugin_php_file))
83 include_once($plugin_php_file);
84 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
85 array(
"version" => $version,
"id" => $id,
86 "ilias_min_version" => $ilias_min_version,
87 "ilias_max_version" => $ilias_max_version,
88 "responsible" => $responsible,
89 "responsible_mail" => $responsible_mail);
92 $active = $rec[
"active"];
93 $needs_update =
false;
94 $activation_possible = !$active;
95 $inactive_reason =
"";
103 $inactive_reason = $lng->txt(
"cmps_needs_newer_ilias_version");
107 $inactive_reason =
"Plugin needs a newer version of ILIAS.";
109 $activation_possible =
false;
116 $inactive_reason = $lng->txt(
"cmps_needs_newer_plugin_version");
120 $inactive_reason =
"Plugin does not support current version of ILIAS. Newer version of plugin needed.";
122 $activation_possible =
false;
124 else if ($rec[
"last_update_version"] ==
"")
129 $inactive_reason = $lng->txt(
"cmps_needs_update");
133 $inactive_reason =
"Update needed.";
135 $needs_update =
true;
136 $activation_possible =
false;
143 $inactive_reason = $lng->txt(
"cmps_needs_upgrade");
147 $inactive_reason =
"Upgrade needed.";
149 $activation_possible =
false;
151 else if ($rec[
"last_update_version"] != $version)
156 $inactive_reason = $lng->txt(
"cmps_needs_update");
160 $inactive_reason =
"Update needed.";
162 $needs_update =
true;
163 $activation_possible =
false;
166 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"is_active"] = $active;
167 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"inactive_reason"] = $inactive_reason;
168 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"needs_update"] = $needs_update;
169 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"activation_possible"] = $activation_possible;
171 $this->got_data[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
true;
183 function getVersion($a_ctype, $a_cname, $a_slot_id, $a_pname)
185 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
186 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"version"];
199 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
200 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"ilias_min_version"];
213 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
214 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"ilias_max_version"];
225 function getId($a_ctype, $a_cname, $a_slot_id, $a_pname)
227 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
228 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"id"];
239 function isActive($a_ctype, $a_cname, $a_slot_id, $a_pname)
241 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
242 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"is_active"];
253 function exists($a_ctype, $a_cname, $a_slot_id, $a_pname)
255 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
256 return isset($this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname]);
269 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
270 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname][
"needs_update"];
281 function getAllData($a_ctype, $a_cname, $a_slot_id, $a_pname)
283 $this->
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
284 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname];
293 if (!isset(self::$active_plugins[$a_ctype][$a_cname][$a_slot_id]))
295 include_once
"./Services/Component/classes/class.ilPlugin.php";
297 self::$active_plugins[$a_ctype][$a_cname][$a_slot_id] =
300 return self::$active_plugins[$a_ctype][$a_cname][$a_slot_id];
315 if (!isset(self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname]))
317 self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
320 return self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname];
336 if (!isset(self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname]))
338 self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname] =
341 $pl = self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname];
342 $pl->includeClass($a_class_file_name);