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

Public Member Functions

 addFilterInputFieldToTable (ilTable2GUI $table)
 
 passThroughFilter (ilDclBaseRecordModel $record, $filter)
 
- Public Member Functions inherited from ilDclFileFieldRepresentation
 getInputField (ilPropertyFormGUI $form, ?int $record_id=null)
 
- 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')
 
- Protected Member Functions inherited from ilDclFileFieldRepresentation
 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

- 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.ilDclMobFieldRepresentation.php.

Member Function Documentation

◆ addFilterInputFieldToTable()

ilDclMobFieldRepresentation::addFilterInputFieldToTable ( ilTable2GUI  $table)

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

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

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  }
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type.
setupFilterInputField(?ilTableFilterItem $input)
Set basic settings for filter-input-gui.
+ Here is the call graph for this function:

◆ buildFieldCreationInput()

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

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

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

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 an option in a radio group.
setInfo(string $a_info)
This class represents a number property in a property form.
+ Here is the call graph for this function:

◆ passThroughFilter()

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

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

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

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.
+ Here is the call graph for this function:

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