ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilDclPluginFieldRepresentation.php
Go to the documentation of this file.
1<?php
2require_once('./Modules/DataCollection/classes/Fields/Base/class.ilDclBaseFieldRepresentation.php');
10
14 protected function buildFieldCreationInput(ilObjDataCollection $dcl, $mode = 'create') {
15 $opt = parent::buildFieldCreationInput($dcl, $mode);
16
17 // only show, when element is created
18 if(get_called_class() == 'ilDclPluginFieldRepresentation') {
20 $options = array();
21 foreach($plugins as $plugin_name) {
23 $options[$plugin_data->getPluginName()] = $plugin_data->getPluginName();
24 }
25
26 if(count($options) > 0) {
27 $plugin_selection = new ilSelectInputGUI($this->lng->txt('dcl_plugin_hooks'), 'prop_' . ilDclBaseFieldModel::PROP_PLUGIN_HOOK_NAME);
28 $plugin_selection->setOptions($options);
29 $opt->addSubItem($plugin_selection);
30 if ($mode == "edit") {
31 $plugin_selection->setDisabled(true);
32 } else {
33
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
44
45}
An exception for terminatinating execution or to throw for unit testing.
const IL_COMP_MODULE
Class ilDclBaseFieldRepresentation.
Class ilDclPluginFieldRepresentation.
buildFieldCreationInput(ilObjDataCollection $dcl, $mode='create')
@inheritDoc
This class represents a non editable value in a property form.
Class ilObjDataCollection.
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
static getActivePluginsForSlot($a_ctype, $a_cname, $a_slot_id)
Get all active plugins for a slot.
This class represents a selection list property in a property form.
if(!is_array($argv)) $options