ILIAS  trunk Revision v11.0_alpha-1861-g09f3d197f78
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilDclPluginFieldRepresentation Class Reference
+ Inheritance diagram for ilDclPluginFieldRepresentation:
+ Collaboration diagram for ilDclPluginFieldRepresentation:

Protected Member Functions

 buildFieldCreationInput (ilObjDataCollection $dcl, string $mode='create')
 
- Protected Member Functions inherited from ilDclBaseFieldRepresentation
 setupFilterInputField (?ilTableFilterItem $input)
 Set basic settings for filter-input-gui. More...
 
 setupInputField (ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
 Sets basic settings on field-input. More...
 
 getFilterInputFieldValue (ilTableFilterItem $input)
 
 buildFieldCreationInput (ilObjDataCollection $dcl, string $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 (string $value, bool $link=true)
 
 getInputField (ilPropertyFormGUI $form, ?int $record_id=null)
 Returns field-input. More...
 
 addFieldCreationForm (ilSubEnabledFormPropertyGUI $form, ilObjDataCollection $dcl, string $mode="create")
 Adds the options for the field-types to the field-creation form. More...
 
 getPropertyInputFieldId (string $property)
 Return post-var for property-fields. More...
 
 getField ()
 Return BaseFieldModel. More...
 
- Protected Attributes inherited from ilDclBaseFieldRepresentation
ilDclBaseFieldModel $field
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ILIAS HTTP Services $http
 
ILIAS Refinery Factory $refinery
 
ilComponentRepository $component_repository
 
ilComponentFactory $component_factory
 

Detailed Description

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

Member Function Documentation

◆ buildFieldCreationInput()

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

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

References XapiProxy\$plugin, ILIAS\Repository\lng(), null, ilDclBaseFieldModel\PROP_PLUGIN_HOOK_NAME, ilSelectInputGUI\setOptions(), and ilDclFieldTypePlugin\SLOT_ID.

23  : ?ilRadioOption
24  {
25  $opt = parent::buildFieldCreationInput($dcl, $mode);
26 
27  // only show, when element is created
28  if (get_called_class() == 'ilDclPluginFieldRepresentation') {
29  $plugins = $this->component_repository->getPluginSlotById(ilDclFieldTypePlugin::SLOT_ID)->getActivePlugins();
30  $options = [];
31  foreach ($plugins as $plugin) {
32  $plugin_data = $this->component_factory->getPlugin($plugin->getId());
33  $options[$plugin_data->getPluginName()] = $plugin_data->getPluginName();
34  }
35 
36  if (count($options) > 0) {
37  $plugin_selection = new ilSelectInputGUI(
38  $this->lng->txt('dcl_plugin_hooks'),
40  );
41  $plugin_selection->setOptions($options);
42  $opt->addSubItem($plugin_selection);
43  if ($mode == "edit") {
44  $plugin_selection->setDisabled(true);
45  } else {
46  }
47  } else {
48  return null;
49  }
50  }
51 
52  return $opt;
53  }
This class represents an option in a radio group.
This class represents a selection list property in a property form.
setOptions(array $a_options)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

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