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();
51 abstract public function getName();
64 $this->
setId($this->global_cache->lookCompId($this->getComponentType(), $this->
getName()));
89 final public function setId($a_id)
111 $this->pluginslots = $a_pluginslots;
121 return $this->pluginslots;
134 $set = $ilDB->queryF(
135 "SELECT * FROM il_component WHERE type = %s " .
137 array(
"text",
"text"),
138 array($a_ctype, $a_cname)
140 if (!$ilDB->fetchAssoc($set)) {
146 if (is_file(
"./Modules/" . $a_cname .
"/classes/class.il" . $a_cname .
"Module.php")) {
147 include_once(
"./Modules/" . $a_cname .
"/classes/class.il" . $a_cname .
"Module.php");
148 $class =
"il" . $a_cname .
"Module";
149 $comp =
new $class();
155 if (is_file(
"./Services/" . $a_cname .
"/classes/class.il" . $a_cname .
"Service.php")) {
156 include_once(
"./Services/" . $a_cname .
"/classes/class.il" . $a_cname .
"Service.php");
157 $class =
"il" . $a_cname .
"Service";
158 $comp =
new $class();
174 $this->subdirectory = $a_subdirectory;
184 return $this->subdirectory;
195 $recs = $cached_component->lookupPluginSlotByComponent(
$a_type .
"/" . $a_name);
202 foreach ($recs as $rec) {
203 $rec[
"dir"] =
"Customizing/global/plugins/" .
$a_type .
"/" . $a_name .
"/" . $rec[
"name"];
204 $rec[
"dir_pres"] =
"Customizing/global/plugins/<br />" .
$a_type .
"/" . $a_name .
"/" . $rec[
"name"];
206 $ps[$rec[
"id"]] = $rec;
220 return $slots[$a_id][
"name"];
233 $this->
getName() .
"/" . $slots[$a_id][
"name"];
244 return $this->
getId() .
"_" . $slots[$a_id][
"id"] .
"_";
286 $parts = explode(
".", $a_ver);
288 if (count($parts) < 2 || count($parts) > 3) {
289 return "Version number does not conform to format a.b or a.b.c";
292 if (!is_numeric($parts[0]) || !is_numeric($parts[1])) {
293 return "Not all version number parts a.b or a.b.c are numeric.";
296 if (isset($parts[2]) && !is_numeric($parts[2])) {
297 return "Not all version number parts a.b.c are numeric.";
308 if (is_array($a_arr1) && is_array($a_arr2)) {
322 return version_compare($version1, $version2,
'>');
335 $query =
'SELECT name from il_component ' .
336 'WHERE id = ' . $ilDB->quote($a_component_id,
'text');
351 $ilDB = $DIC->database();
353 $set =
$ilDB->query(
"SELECT * FROM il_component");
355 while ($rec =
$ilDB->fetchAssoc($set)) {
356 $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.
static getComponentType()
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.
Create styles array
The data for the language used.
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)