5include_once(
"./Services/Component/classes/class.ilPlugin.php");
31 if ($a_slot_id !=
"") {
42 $rec = $cached_component->lookupPluginSlotById($this->
getSlotId());
53 $this->componenttype = $a_componenttype;
63 return $this->componenttype;
73 $this->componentname = $a_componentname;
83 return $this->componentname;
93 $this->slotid = $a_slotid;
103 return $this->slotid;
113 $this->slotname = $a_slotname;
123 return $this->slotname;
140 return "./Customizing/global/plugins/" . $a_ctype .
151 $a_plugin_name .
"/plugin.php";
172 $a_plugin_name .
"/classes/class.il" . $a_plugin_name .
"Plugin.php";
193 if ($this->prefix ==
"") {
201 return $this->prefix;
210 $ilPluginAdmin =
$DIC[
'ilPluginAdmin'];
215 if (!@is_dir($pl_dir)) {
219 $dir = opendir($pl_dir);
222 while ($file = readdir($dir)) {
226 if (@is_dir($pl_dir .
"/" . $file) && substr($file, 0, 1) !=
"." &&
237 if (count($plugin) == 0) {
253 $pdata = $ilPluginAdmin->getAllData(
260 $plugin = array_merge($plugin, $pdata);
262 $plugin[
"name"] = $file;
267 $plugins[] = $plugin;
281 $rec = $cached_component->lookupPluginSlotByName($a_slot_name);
292 $rec = $cached_component->lookupPluginSlotById($a_slot_id);
303 $ilPluginAdmin =
$DIC[
'ilPluginAdmin'];
305 return $ilPluginAdmin->getActivePluginsForSlot(
319 $recs = $cached_component->getIlPluginslotById();
321 foreach ($recs as $rec) {
322 $pos = strpos($rec[
"component"],
"/");
324 "component_type" => substr($rec[
"component"], 0, $pos),
325 "component_name" => substr($rec[
"component"], $pos + 1),
326 "slot_id" => $rec[
"id"],
327 "slot_name" => $rec[
"name"]
An exception for terminatinating execution or to throw for unit testing.
static lookupId($a_type, $a_name)
Lookup ID of a component.
checkClassFileAvailability($a_plugin_name)
Check whether Plugin class file is available for plugin or not.
setComponentName($a_componentname)
Set Component Name.
__construct($a_c_type, $a_c_name, $a_slot_id)
Constructor.
getActivePlugins()
Get active plugins of slot.
static lookupSlotName($a_ctype, $a_cname, $a_slot_id)
Lookup slot name for component and slot id.
read()
Read properties from DB.
setSlotId($a_slotid)
Set Slot ID.
static getAllSlots()
Get all plugin slots.
getPluginPhpFileName($a_plugin_name)
Get File name for plugin.php.
getComponentType()
Get Component Type.
getPrefix()
Get slot prefix, used for lang vars and db tables.
getPluginsInformation()
Get information an all plugins and their status.
getComponentName()
Get Component Name.
setSlotName($a_slotname)
Set Slot Name.
getPluginClassFileName($a_plugin_name)
Get Class File name for plugin.
checkPluginPhpFileAvailability($a_plugin_name)
Check whether plugin.php file is available for plugin or not.
getPluginsDirectory()
Get directory of.
static _getPluginsDirectory($a_ctype, $a_cname, $a_slot_id)
Get plugins directory.
setComponentType($a_componenttype)
Set Component Type.
static lookupSlotId($a_ctype, $a_cname, $a_slot_name)
Lookup slot ID for component and slot name.
getSlotName()
Get Slot Name.
static lookupStoredData(string $a_ctype, string $a_cname, string $a_slot_id, string $a_pname)
Lookup information data in il_plugin.
static createPluginRecord(string $a_ctype, string $a_cname, string $a_slot_id, string $a_pname)