ILIAS  release_7 Revision v7.30-3-g800a261c036
ilDclBooleanFieldRepresentation Class Reference

Class ilDclFileuploadFieldRepresentaion. More...

+ Inheritance diagram for ilDclBooleanFieldRepresentation:
+ Collaboration diagram for ilDclBooleanFieldRepresentation:

Public Member Functions

 getInputField (ilPropertyFormGUI $form, $record_id=0)
 Returns field-input. More...
 
 addFilterInputFieldToTable (ilTable2GUI $table)
 Add filter input to TableGUI. More...
 
 passThroughFilter (ilDclBaseRecordModel $record, $filter)
 Checks if a filter affects a record. More...
 
- 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...
 

Additional Inherited Members

- 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...
 
- Protected Attributes inherited from ilDclBaseFieldRepresentation
 $field
 
 $lng
 
 $ctrl
 

Detailed Description

Class ilDclFileuploadFieldRepresentaion.

Author
Michael Herren mh@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Version
1.0.0

Definition at line 9 of file class.ilDclBooleanFieldRepresentation.php.

Member Function Documentation

◆ addFilterInputFieldToTable()

ilDclBooleanFieldRepresentation::addFilterInputFieldToTable ( ilTable2GUI  $table)

Add filter input to TableGUI.

Parameters
ilTable2GUI$table
Returns
null

Reimplemented from ilDclBaseFieldRepresentation.

Definition at line 20 of file class.ilDclBooleanFieldRepresentation.php.

21 {
22 $input = $table->addFilterItemByMetaType("filter_" . $this->getField()->getId(), ilTable2GUI::FILTER_SELECT, false, $this->getField()->getId());
23 $input->setOptions(
24 array(
25 "" => $this->lng->txt("dcl_any"),
26 "not_checked" => $this->lng->txt("dcl_not_checked"),
27 "checked" => $this->lng->txt("dcl_checked"),
28 )
29 );
30
31 $this->setupFilterInputField($input);
32
33 return $this->getFilterInputFieldValue($input);
34 }
setupFilterInputField(ilFormPropertyGUI $input)
Set basic settings for filter-input-gui.
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
Add filter by standard type.

References ilTable2GUI\addFilterItemByMetaType(), ilTable2GUI\FILTER_SELECT, ilDclBaseFieldRepresentation\getField(), ilDclBaseFieldRepresentation\getFilterInputFieldValue(), and ilDclBaseFieldRepresentation\setupFilterInputField().

+ Here is the call graph for this function:

◆ getInputField()

ilDclBooleanFieldRepresentation::getInputField ( ilPropertyFormGUI  $form,
  $record_id = 0 
)

Returns field-input.

Parameters
ilPropertyFormGUI$form
int$record_id
Returns
?ilFormPropertyGUI

Reimplemented from ilDclBaseFieldRepresentation.

Definition at line 11 of file class.ilDclBooleanFieldRepresentation.php.

12 {
13 $input = new ilDclCheckboxInputGUI($this->getField()->getTitle(), 'field_' . $this->getField()->getId());
14 $this->setupInputField($input, $this->getField());
15
16 return $input;
17 }
setupInputField(ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
Sets basic settings on field-input.
Class ilDclCheckboxInputGUI.

References ilDclBaseFieldRepresentation\getField(), and ilDclBaseFieldRepresentation\setupInputField().

+ Here is the call graph for this function:

◆ passThroughFilter()

ilDclBooleanFieldRepresentation::passThroughFilter ( ilDclBaseRecordModel  $record,
  $filter 
)

Checks if a filter affects a record.

Parameters
ilDclBaseRecordModel$record
$filter
Returns
bool

Reimplemented from ilDclBaseFieldRepresentation.

Definition at line 37 of file class.ilDclBooleanFieldRepresentation.php.

38 {
39 $value = $record->getRecordFieldValue($this->getField()->getId());
40 if ((($filter == "checked" && $value == 1) || ($filter == "not_checked" && $value == 0)) || $filter == '' || !$filter) {
41 return true;
42 }
43
44 return false;
45 }
getRecordFieldValue($field_id)
Get Field Value.

References ilDclBaseFieldRepresentation\getField(), and ilDclBaseRecordModel\getRecordFieldValue().

+ Here is the call graph for this function:

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