3 require_once(
'class.ilCachedComponentData.php');
5 define(
"IL_COMP_MODULE",
"Modules");
6 define(
"IL_COMP_SERVICE",
"Services");
7 define(
"IL_COMP_PLUGIN",
"Plugins");
8 define(
"IL_COMP_SLOTS",
"Slots");
42 abstract public function isCore();
54 abstract public function getName();
66 $this->
setId($this->global_cache->lookCompId($this->getComponentType(), $this->
getName()));
78 final public function setId($a_id)
100 $this->pluginslots = $a_pluginslots;
110 return $this->pluginslots;
122 $ilDB = $DIC->database();
124 $set =
$ilDB->queryF(
125 "SELECT * FROM il_component WHERE type = %s " .
127 array(
"text",
"text"),
128 array($a_ctype, $a_cname)
130 if (!
$ilDB->fetchAssoc($set)) {
136 if (is_file(
"./Modules/" . $a_cname .
"/classes/class.il" . $a_cname .
"Module.php")) {
137 include_once(
"./Modules/" . $a_cname .
"/classes/class.il" . $a_cname .
"Module.php");
138 $class =
"il" . $a_cname .
"Module";
139 $comp =
new $class();
145 if (is_file(
"./Services/" . $a_cname .
"/classes/class.il" . $a_cname .
"Service.php")) {
146 include_once(
"./Services/" . $a_cname .
"/classes/class.il" . $a_cname .
"Service.php");
147 $class =
"il" . $a_cname .
"Service";
148 $comp =
new $class();
174 return $this->subdirectory;
183 $recs = $cached_component->lookupPluginSlotByComponent(
$a_type .
"/" . $a_name);
186 foreach ($recs as $rec) {
187 $rec[
"dir"] =
"Customizing/global/plugins/" .
$a_type .
"/" . $a_name .
"/" . $rec[
"name"];
188 $rec[
"dir_pres"] =
"Customizing/global/plugins/<br />" .
$a_type .
"/" . $a_name .
"/" . $rec[
"name"];
190 $ps[$rec[
"id"]] = $rec;
204 return $slots[$a_id][
"name"];
217 $this->
getName() .
"/" . $slots[$a_id][
"name"];
228 return $this->
getId() .
"_" . $slots[$a_id][
"id"] .
"_";
259 $parts = explode(
".", $a_ver);
261 if (count($parts) < 2 || count($parts) > 3) {
262 return "Version number does not conform to format a.b or a.b.c";
265 if (!is_numeric($parts[0]) || !is_numeric($parts[1])) {
266 return "Not all version number parts a.b or a.b.c are numeric.";
269 if (isset($parts[2]) && !is_numeric($parts[2])) {
270 return "Not all version number parts a.b.c are numeric.";
281 if (is_array($a_arr1) && is_array($a_arr2)) {
295 return version_compare($version1, $version2,
'>');
307 $ilDB = $DIC->database();
309 $query =
'SELECT name from il_component ' .
310 'WHERE id = ' .
$ilDB->quote($a_component_id,
'text');
325 $ilDB = $DIC->database();
327 $set =
$ilDB->query(
"SELECT * FROM il_component");
329 while ($rec =
$ilDB->fetchAssoc($set)) {
330 $comps[$rec[
"id"]] = $rec;
static getComponentObject($a_ctype, $a_cname)
Get component object.
getVersion()
Get Version Number of Component.
getPluginSlots()
Get Plugin Slots.
static lookupId($a_type, $a_name)
Lookup ID of a component.
setPluginSlots($a_pluginslots)
Set Plugin Slots.
static isVersionGreaterString($a_ver1, $a_ver2)
if(!array_key_exists('StateId', $_REQUEST)) $id
getSubDirectory()
Get Sub Directory.
setSubDirectory($a_subdirectory)
Set Sub Directory.
static lookupComponentName($a_component_id)
lookup component name type $ilDB
foreach($_POST as $key=> $value) $res
static checkVersionNumber($a_ver)
Check version number.
static isVersionGreater(string $version1, string $version2)
getPluginSlotLanguagePrefix($a_id)
Get language prefix for plugin slot.
getPluginSlotDirectory($a_id)
Get directory of plugin slot.
getPluginSlotName($a_id)
Get name of plugin slot.
static lookupPluginSlots($a_type, $a_name)
Lookup all plugin slots of a component.
static getComponentInfo($a_type, $a_name)