4include_once(
"Services/Table/classes/class.ilTable2GUI.php");
5include_once(
"Services/Component/classes/class.ilComponent.php");
22 public function __construct($a_parent_obj, $a_parent_cmd =
"")
25 $this->lng =
$DIC->language();
26 $this->ctrl =
$DIC->ctrl();
28 parent::__construct($a_parent_obj, $a_parent_cmd);
30 $this->
setId(
"cmpspl");
32 $this->
addColumn($this->lng->txt(
"cmps_plugin"),
"plugin_name");
33 $this->
addColumn($this->lng->txt(
"id"),
"plugin_id");
34 $this->
addColumn($this->lng->txt(
"cmps_plugin_slot"),
"slot_name");
35 $this->
addColumn($this->lng->txt(
"cmps_component"),
"component_name");
36 $this->
addColumn($this->lng->txt(
"active"),
"plugin_active");
37 $this->
addColumn($this->lng->txt(
"action"));
42 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
44 "tpl.plugin_overview_row.html",
50 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
75 include_once(
"./Services/Component/classes/class.ilModule.php");
86 include_once(
"./Services/Component/classes/class.ilService.php");
99 protected function addPluginData(array &$plugins, array $core_items, $core_type)
101 foreach ($core_items as $core_item) {
103 foreach ($plugin_slots as $plugin_slot) {
104 $slot =
new ilPluginSlot($core_type, $core_item[
"subdir"], $plugin_slot[
"id"]);
105 foreach ($slot->getPluginsInformation() as $plugin) {
106 $plugins[] = $this->
gatherPluginData($core_type, $slot, $core_item[
"subdir"], $plugin);
123 $config_class =
null;
129 return array(
"slot_name" => $a_slot->
getSlotName(),
131 "component_name" => $a_slot_subdir,
133 "plugin_id" => $a_plugin[
"id"],
134 "plugin_name" => $a_plugin[
"name"],
135 "must_install" => $a_plugin[
"must_install"],
136 "plugin_active" => $a_plugin[
"is_active"],
137 "activation_possible" => $a_plugin[
"activation_possible"],
138 "needs_update" => $a_plugin[
"needs_update"],
139 "config_class" => $config_class,
153 $this->tpl->setVariable(
"TXT_SLOT_NAME", $a_set[
"slot_name"]);
154 $this->tpl->setVariable(
156 $a_set[
"component_type"] .
"/" . $a_set[
"component_name"]
159 if ($a_set[
"plugin_active"]) {
160 $this->tpl->setCurrentBlock(
"active");
161 $this->tpl->setVariable(
"TXT_ACTIVE", $this->lng->txt(
"yes"));
162 $this->tpl->parseCurrentBlock();
164 $this->tpl->setCurrentBlock(
"inactive");
165 $this->tpl->setVariable(
"TXT_INACTIVE", $this->lng->txt(
"no"));
166 $this->tpl->parseCurrentBlock();
169 $this->tpl->setVariable(
"TXT_PLUGIN_NAME", $a_set[
"plugin_name"]);
170 $this->tpl->setVariable(
"TXT_PLUGIN_ID", $a_set[
"plugin_id"]);
172 if ($rbacsystem->checkAccess(
'write',
$_GET[
'ref_id'])) {
174 $this->tpl->setVariable(
"ACTION_SELECTOR", $this->
getActionMenu($actions, $a_set[
"plugin_id"]));
189 $alist->setId($plugin_id);
190 $alist->setListTitle($this->lng->txt(
"actions"));
192 foreach ($actions as $caption => $cmd) {
193 $alist->addItem($caption,
"", $cmd);
196 return $alist->getHTML();
211 $this->ctrl->setParameter($this->parent_obj,
"plugin_id", $a_set[
"plugin_id"]);
213 $this->ctrl->setParameter($this->parent_obj,
"plugin_id",
null);
215 if ($a_set[
"must_install"]) {
218 if ($a_set[
"config_class"]) {
219 $actions[$this->lng->txt(
"cmps_configure")] =
220 $this->ctrl->getLinkTargetByClass($a_set[
"config_class"],
"configure");
223 if ($a_set[
"has_lang"]) {
227 if ($a_set[
"plugin_active"]) {
231 if ($a_set[
"activation_possible"]) {
236 if ($a_set[
"needs_update"]) {
258 $this->ctrl->setParameter($this->parent_obj,
"ctype", $a_set[
"component_type"]);
259 $this->ctrl->setParameter($this->parent_obj,
"cname", $a_set[
"component_name"]);
260 $this->ctrl->setParameter($this->parent_obj,
"slot_id", $a_set[
"slot_id"]);
261 $this->ctrl->setParameter($this->parent_obj,
"pname", $a_set[
"plugin_name"]);
271 $this->ctrl->setParameter($this->parent_obj,
"ctype",
null);
272 $this->ctrl->setParameter($this->parent_obj,
"cname",
null);
273 $this->ctrl->setParameter($this->parent_obj,
"slot_id",
null);
274 $this->ctrl->setParameter($this->parent_obj,
"pname",
null);
288 $actions[$this->lng->txt($caption)] =
289 $this->ctrl->getLinkTarget($this->parent_obj, $command);
An exception for terminatinating execution or to throw for unit testing.
User interface class for advanced drop-down selection lists.
static lookupPluginSlots($a_type, $a_name)
Lookup all plugin slots of a component.
static getAvailableCoreModules()
Get all available core modules.
getPluginsDirectory()
Get directory of.
getSlotName()
Get Slot Name.
static getAvailableLangFiles($a_lang_directory)
Get array of all language files in the plugin.
static getConfigureClassName($a_name)
Get plugin configure class name.
static hasConfigureClass($a_slot_dir, $a_name)
Has the plugin a configure class?
TableGUI class for components listing.
fillRow($a_set)
Standard Version of Fill Row.
getActionMenu(array $actions, $plugin_id)
Get action menu for each row.
getComponents()
Get pages for list.
__construct($a_parent_obj, $a_parent_cmd="")
Constructor.
gatherPluginData($a_type, ilPluginSlot $a_slot, $a_slot_subdir, array $a_plugin)
Process plugin data for table row.
setParameter(array $a_set)
Set parameter for plugin.
addPluginData(array &$plugins, array $core_items, $core_type)
Get plugin informations.
addCommandToActions(array &$actions, $caption, $command)
Add command to actions.
getServicesCoreItems()
Get all available services.
getActionMenuEntries(array $a_set)
Get entries for action menu.
clearParameter()
Clear parameter.
getModulesCoreItems()
Get all available modules.
static getAvailableCoreServices()
Get all available core services.
setEnableHeader($a_enableheader)
Set Enable Header.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setLimit($a_limit=0, $a_default_limit=0)
set max.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.