ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilDclSelectionFieldRepresentation Class Reference

Class ilDclSelectionFieldRepresentation. More...

+ Inheritance diagram for ilDclSelectionFieldRepresentation:
+ Collaboration diagram for ilDclSelectionFieldRepresentation:

Public Member Functions

 addFilterInputFieldToTable (ilTable2GUI $table)
 
- 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...
 

Data Fields

const PROP_SELECTION_TYPE = ''
 
const PROP_SELECTION_OPTIONS = ''
 

Protected Member Functions

 buildFieldCreationInput (ilObjDataCollection $dcl, $mode='create')
 
 buildOptionsInput ()
 
- 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

- Protected Attributes inherited from ilDclBaseFieldRepresentation
 $field
 
 $lng
 
 $ctrl
 

Detailed Description

Member Function Documentation

◆ addFilterInputFieldToTable()

ilDclSelectionFieldRepresentation::addFilterInputFieldToTable ( ilTable2GUI  $table)
Parameters
ilTable2GUI$table
Returns
null

Definition at line 111 of file class.ilDclSelectionFieldRepresentation.php.

References $input, PHPMailer\PHPMailer\$options, ilTable2GUI\addFilterItemByMetaType(), buildOptionsInput(), ilTable2GUI\FILTER_SELECT, ilDclSelectionOption\getAllForField(), ilDclBaseFieldRepresentation\getField(), ilDclBaseFieldRepresentation\getFilterInputFieldValue(), and ilDclBaseFieldRepresentation\setupFilterInputField().

112  {
113  $input = $table->addFilterItemByMetaType("filter_" . $this->getField()->getId(), ilTable2GUI::FILTER_SELECT, false, $this->getField()->getId());
114 
116  $array = array('' => $this->lng->txt('dcl_any'));
117  foreach ($options as $opt) {
118  $array[$opt->getOptId()] = $opt->getValue();
119  }
120 
121  $input->setOptions($array);
122 
124 
125  return $this->getFilterInputFieldValue($input);
126  }
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
Add filter by standard type.
setupFilterInputField(ilFormPropertyGUI $input)
Set basic settings for filter-input-gui.
+ Here is the call graph for this function:

◆ buildFieldCreationInput()

ilDclSelectionFieldRepresentation::buildFieldCreationInput ( ilObjDataCollection  $dcl,
  $mode = 'create' 
)
protected
Parameters
ilObjDataCollection$dcl
string$mode
Returns
ilPropertyFormGUI

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

References $form, $input, PHPMailer\PHPMailer\$options, ilRadioOption\addSubItem(), buildOptionsInput(), ilDclSelectionOption\getAllForField(), ilDclBaseFieldRepresentation\getField(), ilDclBaseFieldRepresentation\getInputField(), ilDclSelectionFieldModel\SELECTION_TYPE_COMBOBOX, ilDclSelectionFieldModel\SELECTION_TYPE_MULTI, ilDclSelectionFieldModel\SELECTION_TYPE_SINGLE, ilFormPropertyGUI\setRequired(), and ilDclBaseFieldRepresentation\setupInputField().

24  {
25  $opt = parent::buildFieldCreationInput($dcl, $mode);
26 
27  $selection_options = $this->buildOptionsInput();
28  $opt->addSubItem($selection_options);
29 
30  $selection_type = new ilRadioGroupInputGUI($this->lng->txt('dcl_selection_type'), 'prop_' . static::PROP_SELECTION_TYPE);
31  $selection_type->setRequired(true);
32 
33  $option_1 = new ilRadioOption(
34  $this->lng->txt('dcl_' . ilDclSelectionFieldModel::SELECTION_TYPE_SINGLE),
36  );
37  $selection_type->addOption($option_1);
38 
39  $option_2 = new ilRadioOption(
40  $this->lng->txt('dcl_' . ilDclSelectionFieldModel::SELECTION_TYPE_MULTI),
42  );
43  $selection_type->addOption($option_2);
44 
45  $option_3 = new ilRadioOption(
46  $this->lng->txt('dcl_' . ilDclSelectionFieldModel::SELECTION_TYPE_COMBOBOX),
48  );
49  $selection_type->addOption($option_3);
50 
51  $opt->addSubItem($selection_type);
52 
53  return $opt;
54  }
This class represents an option in a radio group.
This class represents a property in a property form.
addSubItem($a_item)
Add Subitem.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:

◆ buildOptionsInput()

ilDclSelectionFieldRepresentation::buildOptionsInput ( )
abstractprotected
Returns
mixed

Referenced by addFilterInputFieldToTable(), and buildFieldCreationInput().

+ Here is the caller graph for this function:

Field Documentation

◆ PROP_SELECTION_OPTIONS

const ilDclSelectionFieldRepresentation::PROP_SELECTION_OPTIONS = ''

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

◆ PROP_SELECTION_TYPE

const ilDclSelectionFieldRepresentation::PROP_SELECTION_TYPE = ''

Definition at line 13 of file class.ilDclSelectionFieldRepresentation.php.


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