ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilDclMobFieldRepresentation Class Reference
+ Inheritance diagram for ilDclMobFieldRepresentation:
+ Collaboration diagram for ilDclMobFieldRepresentation:

Public Member Functions

 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 ilDclFileFieldRepresentation
 getInputField (ilPropertyFormGUI $form, ?int $record_id=null)
 Returns field-input. 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 (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 Member Functions

 buildFieldCreationInput (ilObjDataCollection $dcl, string $mode='create')
 Build the creation-input-field. More...
 
 buildFieldCreationInput (ilObjDataCollection $dcl, string $mode='create')
 Build the creation-input-field. More...
 
- 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

- Protected Attributes inherited from ilDclBaseFieldRepresentation
ilDclBaseFieldModel $field
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilObjUser $user
 
ILIAS HTTP Services $http
 
ILIAS Refinery Factory $refinery
 
ilComponentRepository $component_repository
 
ilComponentFactory $component_factory
 

Detailed Description

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

Member Function Documentation

◆ addFilterInputFieldToTable()

ilDclMobFieldRepresentation::addFilterInputFieldToTable ( ilTable2GUI  $table)

Add filter input to TableGUI.

Parameters
ilTable2GUI$table
Returns
null

Reimplemented from ilDclBaseFieldRepresentation.

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

24 {
25 $input = $table->addFilterItemByMetaType(
26 "filter_" . $this->getField()->getId(),
28 false,
29 $this->getField()->getId()
30 );
31 $input->setSubmitFormOnEnter(true);
32
33 $this->setupFilterInputField($input);
34
35 return $this->getFilterInputFieldValue($input);
36 }
setupFilterInputField(?ilTableFilterItem $input)
Set basic settings for filter-input-gui.
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type.

References ilTable2GUI\addFilterItemByMetaType(), ilTable2GUI\FILTER_TEXT, ilDclBaseFieldRepresentation\getField(), ilDclBaseFieldRepresentation\getFilterInputFieldValue(), ILIAS\Survey\Mode\getId(), and ilDclBaseFieldRepresentation\setupFilterInputField().

+ Here is the call graph for this function:

◆ buildFieldCreationInput()

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

Build the creation-input-field.

Reimplemented from ilDclFileFieldRepresentation.

Definition at line 51 of file class.ilDclMobFieldRepresentation.php.

52 {
53 $opt = new ilRadioOption(
54 $this->lng->txt('dcl_' . $this->getField()->getDatatype()->getTitle()),
55 (string) $this->getField()->getDatatypeId()
56 );
57 $opt->setInfo($this->lng->txt('dcl_' . $this->getField()->getDatatype()->getTitle() . '_desc'));
58
59 $opt->setInfo(sprintf($opt->getInfo(), implode(", ", $this->getField()->getSupportedExtensions())));
60
61 $prop_width = new ilNumberInputGUI($this->lng->txt('dcl_width'), 'prop_' . ilDclBaseFieldModel::PROP_WIDTH);
62 $prop_width->setInfo($this->lng->txt('dcl_width_desc'));
63 $prop_width->setSize(5);
64 $prop_width->setMaxValue(4000);
65
66 $opt->addSubItem($prop_width);
67
68 $prop_height = new ilNumberInputGUI($this->lng->txt('dcl_height'), 'prop_' . ilDclBaseFieldModel::PROP_HEIGHT);
69 $prop_height->setInfo($this->lng->txt('dcl_height_desc'));
70 $prop_height->setSize(5);
71 $prop_height->setMaxValue(4000);
72
73 $opt->addSubItem($prop_height);
74
75 $prop_page_details = new ilDclCheckboxInputGUI(
76 $this->lng->txt('dcl_link_detail_page'),
78 );
79 $prop_page_details->setInfo($this->lng->txt('dcl_link_detail_page_desc'));
80
81 $opt->addSubItem($prop_page_details);
82
83 return $opt;
84 }
This class represents a number property in a property form.
This class represents an option in a radio group.

References ilDclBaseFieldRepresentation\getField(), ILIAS\Repository\lng(), ilDclBaseFieldModel\PROP_HEIGHT, ilDclBaseFieldModel\PROP_LINK_DETAIL_PAGE_MOB, and ilDclBaseFieldModel\PROP_WIDTH.

+ Here is the call graph for this function:

◆ passThroughFilter()

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

Checks if a filter affects a record.

Parameters
int | string | array$filter

Reimplemented from ilDclBaseFieldRepresentation.

Definition at line 38 of file class.ilDclMobFieldRepresentation.php.

38 : bool
39 {
40 $value = $record->getRecordFieldValue($this->getField()->getId());
41
42 $m_obj = new ilObjMediaObject($value);
43 $file_name = $m_obj->getTitle();
44 if (!$filter || strpos(strtolower($file_name), strtolower($filter)) !== false) {
45 return true;
46 }
47
48 return false;
49 }
getRecordFieldValue(?string $field_id)
Get Field Value.

References ilDclBaseFieldRepresentation\getField(), ILIAS\Survey\Mode\getId(), and ilDclBaseRecordModel\getRecordFieldValue().

+ Here is the call graph for this function:

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