ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilDclPluginFieldRepresentation.php
Go to the documentation of this file.
1 <?php
2 
10 {
11 
15  protected function buildFieldCreationInput(ilObjDataCollection $dcl, $mode = 'create')
16  {
17  $opt = parent::buildFieldCreationInput($dcl, $mode);
18 
19  // only show, when element is created
20  if (get_called_class() == 'ilDclPluginFieldRepresentation') {
22  $options = array();
23  foreach ($plugins as $plugin_name) {
25  $options[$plugin_data->getPluginName()] = $plugin_data->getPluginName();
26  }
27 
28  if (count($options) > 0) {
29  $plugin_selection = new ilSelectInputGUI($this->lng->txt('dcl_plugin_hooks'), 'prop_' . ilDclBaseFieldModel::PROP_PLUGIN_HOOK_NAME);
30  $plugin_selection->setOptions($options);
31  $opt->addSubItem($plugin_selection);
32  if ($mode == "edit") {
33  $plugin_selection->setDisabled(true);
34  } else {
35  }
36  } else {
37  $plugin_selection = new ilNonEditableValueGUI($this->lng->txt('dcl_plugin_no_hooks_available'), 'prop_' . ilDclBaseFieldModel::PROP_PLUGIN_HOOK_NAME);
38  $opt->addSubItem($plugin_selection);
39  }
40  }
41 
42  return $opt;
43  }
44 }
This class represents a selection list property in a property form.
static getActivePluginsForSlot($a_ctype, $a_cname, $a_slot_id)
Get all active plugins for a slot.
buildFieldCreationInput(ilObjDataCollection $dcl, $mode='create')
const IL_COMP_MODULE
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
setOptions($a_options)
Set Options.
Class ilDclPluginFieldRepresentation.
This class represents a non editable value in a property form.
Class ilDclBaseFieldRepresentation.
Class ilObjDataCollection.