ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 110 of file class.ilDclSelectionFieldRepresentation.php.

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

111  {
112  $input = $table->addFilterItemByMetaType("filter_" . $this->getField()->getId(), ilTable2GUI::FILTER_SELECT, false, $this->getField()->getId());
113 
115  $array = array('' => $this->lng->txt('dcl_any'));
116  foreach ($options as $opt) {
117  $array[$opt->getOptId()] = $opt->getValue();
118  }
119 
120  $input->setOptions($array);
121 
122  $this->setupFilterInputField($input);
123 
124  return $this->getFilterInputFieldValue($input);
125  }
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.
Create styles array
The data for the language used.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
+ 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 22 of file class.ilDclSelectionFieldRepresentation.php.

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

23  {
24  $opt = parent::buildFieldCreationInput($dcl, $mode);
25 
26  $selection_options = $this->buildOptionsInput();
27  $opt->addSubItem($selection_options);
28 
29  $selection_type = new ilRadioGroupInputGUI($this->lng->txt('dcl_selection_type'), 'prop_' . static::PROP_SELECTION_TYPE);
30  $selection_type->setRequired(true);
31 
32  $option_1 = new ilRadioOption(
33  $this->lng->txt('dcl_' . ilDclSelectionFieldModel::SELECTION_TYPE_SINGLE),
35  );
36  $selection_type->addOption($option_1);
37 
38  $option_2 = new ilRadioOption(
39  $this->lng->txt('dcl_' . ilDclSelectionFieldModel::SELECTION_TYPE_MULTI),
41  );
42  $selection_type->addOption($option_2);
43 
44  $option_3 = new ilRadioOption(
45  $this->lng->txt('dcl_' . ilDclSelectionFieldModel::SELECTION_TYPE_COMBOBOX),
47  );
48  $selection_type->addOption($option_3);
49 
50  $opt->addSubItem($selection_type);
51 
52  return $opt;
53  }
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 13 of file class.ilDclSelectionFieldRepresentation.php.

◆ PROP_SELECTION_TYPE

const ilDclSelectionFieldRepresentation::PROP_SELECTION_TYPE = ''

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


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