ILIAS  release_8 Revision v8.24
class.ilDclPluginFieldRepresentation.php
Go to the documentation of this file.
1<?php
2
20{
21 protected function buildFieldCreationInput(ilObjDataCollection $dcl, string $mode = 'create'): ?ilRadioOption
22 {
23 $opt = parent::buildFieldCreationInput($dcl, $mode);
24
25 // only show, when element is created
26 if (get_called_class() == 'ilDclPluginFieldRepresentation') {
27 $plugins = $this->component_repository->getPluginSlotById(ilDclFieldTypePlugin::SLOT_ID)->getActivePlugins();
28 $options = array();
29 foreach ($plugins as $plugin) {
30 $plugin_data = $this->component_factory->getPlugin($plugin->getId());
31 $options[$plugin_data->getPluginName()] = $plugin_data->getPluginName();
32 }
33
34 if (count($options) > 0) {
35 $plugin_selection = new ilSelectInputGUI(
36 $this->lng->txt('dcl_plugin_hooks'),
38 );
39 $plugin_selection->setOptions($options);
40 $opt->addSubItem($plugin_selection);
41 if ($mode == "edit") {
42 $plugin_selection->setDisabled(true);
43 } else {
44 }
45 } else {
46 return null;
47 }
48 }
49
50 return $opt;
51 }
52}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
buildFieldCreationInput(ilObjDataCollection $dcl, string $mode='create')
Build the creation-input-field.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a selection list property in a property form.