ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilDclPluginFieldRepresentation Class Reference

Class ilDclPluginFieldRepresentation. More...

+ Inheritance diagram for ilDclPluginFieldRepresentation:
+ Collaboration diagram for ilDclPluginFieldRepresentation:

Protected Member Functions

 buildFieldCreationInput (ilObjDataCollection $dcl, $mode='create')
 
- Protected Member Functions inherited from ilDclBaseFieldRepresentation
 setupFilterInputField (ilFormPropertyGUI $input)
 Set basic settings for filter-input-gui. More...
 
 setupInputField (ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
 Sets basic settings on field-input. More...
 
 getFilterInputFieldValue ( $input)
 
 buildFieldCreationInput (ilObjDataCollection $dcl, $mode='create')
 Build the creation-input-field. More...
 

Additional Inherited Members

- Public Member Functions inherited from ilDclBaseFieldRepresentation
 __construct (ilDclBaseFieldModel $field)
 
 addFilterInputFieldToTable (ilTable2GUI $table)
 Add filter input to TableGUI. More...
 
 passThroughFilter (ilDclBaseRecordModel $record, $filter)
 Checks if a filter affects a record. More...
 
 parseSortingValue ($value, $link=true)
 
 getInputField (ilPropertyFormGUI $form, $record_id=0)
 Returns field-input. More...
 
 addFieldCreationForm ($form, ilObjDataCollection $dcl, $mode="create")
 Adds the options for the field-types to the field-creation form. More...
 
 getPropertyInputFieldId ($property)
 Return post-var for property-fields. More...
 
 getField ()
 Return BaseFieldModel. More...
 
- Protected Attributes inherited from ilDclBaseFieldRepresentation
 $field
 
 $lng
 
 $ctrl
 

Detailed Description

Member Function Documentation

◆ buildFieldCreationInput()

ilDclPluginFieldRepresentation::buildFieldCreationInput ( ilObjDataCollection  $dcl,
  $mode = 'create' 
)
protected

Definition at line 14 of file class.ilDclPluginFieldRepresentation.php.

References $options, ilSubEnabledFormPropertyGUI\addSubItem(), array, ilDclFieldTypePlugin\COMPONENT_NAME, ilPluginAdmin\getActivePluginsForSlot(), ilPluginAdmin\getPluginObject(), IL_COMP_MODULE, ilDclBaseFieldModel\PROP_PLUGIN_HOOK_NAME, ilSelectInputGUI\setOptions(), and ilDclFieldTypePlugin\SLOT_ID.

14  {
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  }
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.
if(!is_array($argv)) $options
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.
This class represents a non editable value in a property form.
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: