ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilDclPluginFieldRepresentation.php
Go to the documentation of this file.
1 <?php
9 {
10 
14  protected function buildFieldCreationInput(ilObjDataCollection $dcl, $mode = 'create')
15  {
16  $opt = parent::buildFieldCreationInput($dcl, $mode);
17 
18  // only show, when element is created
19  if (get_called_class() == 'ilDclPluginFieldRepresentation') {
21  $options = array();
22  foreach ($plugins as $plugin_name) {
24  $options[$plugin_data->getPluginName()] = $plugin_data->getPluginName();
25  }
26 
27  if (count($options) > 0) {
28  $plugin_selection = new ilSelectInputGUI($this->lng->txt('dcl_plugin_hooks'), 'prop_' . ilDclBaseFieldModel::PROP_PLUGIN_HOOK_NAME);
29  $plugin_selection->setOptions($options);
30  $opt->addSubItem($plugin_selection);
31  if ($mode == "edit") {
32  $plugin_selection->setDisabled(true);
33  } else {
34  }
35  } else {
36  $plugin_selection = new ilNonEditableValueGUI($this->lng->txt('dcl_plugin_no_hooks_available'), 'prop_' . ilDclBaseFieldModel::PROP_PLUGIN_HOOK_NAME);
37  $opt->addSubItem($plugin_selection);
38  }
39  }
40 
41  return $opt;
42  }
43 }
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.
Create styles array
The data for the language used.
Class ilDclPluginFieldRepresentation.
This class represents a non editable value in a property form.
Class ilDclBaseFieldRepresentation.
Class ilObjDataCollection.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20