ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilDclMobFieldRepresentation Class Reference

Class ilDclFileuploadFieldRepresentaion. More...

+ Inheritance diagram for ilDclMobFieldRepresentation:
+ Collaboration diagram for ilDclMobFieldRepresentation:

Public Member Functions

 getInputField (ilPropertyFormGUI $form, $record_id=0)
 
 addFilterInputFieldToTable (ilTable2GUI $table)
 
 passThroughFilter (ilDclBaseRecordModel $record, $filter)
 
 buildFieldCreationInput (ilObjDataCollection $dcl, $mode='create')
 
- Public Member Functions inherited from ilDclFileuploadFieldRepresentation
 getInputField (ilPropertyFormGUI $form, $record_id=0)
 
 addFilterInputFieldToTable (ilTable2GUI $table)
 
 passThroughFilter (ilDclBaseRecordModel $record, $filter)
 
 buildFieldCreationInput (ilObjDataCollection $dcl, $mode='create')
 
- 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 ilDclFileuploadFieldRepresentation
 requiredWorkaroundForInputField ($input, $record_id)
 
- 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.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(), and ilDclBaseFieldRepresentation\setupFilterInputField().

24  {
25  $input = $table->addFilterItemByMetaType("filter_" . $this->getField()->getId(), ilTable2GUI::FILTER_TEXT, false, $this->getField()->getId());
26  $input->setSubmitFormOnEnter(true);
27 
28  $this->setupFilterInputField($input);
29  return $this->getFilterInputFieldValue($input);
30  }
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()

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

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

References ilDclMobFieldModel\$mob_suffixes, ilSubEnabledFormPropertyGUI\addSubItem(), ilDclBaseFieldRepresentation\getField(), ilDclBaseFieldModel\PROP_HEIGHT, ilDclBaseFieldModel\PROP_LINK_DETAIL_PAGE_TEXT, ilDclBaseFieldModel\PROP_WIDTH, ilRadioOption\setInfo(), and ilNumberInputGUI\setSize().

49  {
50  $opt = new ilRadioOption($this->lng->txt('dcl_' . $this->getField()->getDatatype()->getTitle()), $this->getField()->getDatatypeId());
51  $opt->setInfo($this->lng->txt('dcl_' . $this->getField()->getDatatype()->getTitle() . '_desc'));
52 
53  $opt->setInfo(sprintf($opt->getInfo(), implode(", ", ilDclMobFieldModel::$mob_suffixes)));
54 
55  $prop_width = new ilNumberInputGUI($this->lng->txt('dcl_width'), 'prop_' . ilDclBaseFieldModel::PROP_WIDTH);
56  $prop_width->setSize(5);
57  $prop_width->setMaxValue(4000);
58 
59  $opt->addSubItem($prop_width);
60 
61  $prop_height = new ilNumberInputGUI($this->lng->txt('dcl_height'), 'prop_' . ilDclBaseFieldModel::PROP_HEIGHT);
62  $prop_height->setSize(5);
63  $prop_height->setMaxValue(4000);
64 
65  $opt->addSubItem($prop_height);
66 
67  $prop_page_details = new ilDclCheckboxInputGUI($this->lng->txt('dcl_link_detail_page'), 'prop_' . ilDclBaseFieldModel::PROP_LINK_DETAIL_PAGE_TEXT);
68  $opt->addSubItem($prop_page_details);
69 
70  return $opt;
71  }
This class represents an option in a radio group.
setInfo($a_info)
Set Info.
This class represents a number property in a property form.
setSize($a_size)
Set Size.
Class ilDclCheckboxInputGUI.
+ Here is the call graph for this function:

◆ getInputField()

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

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

References ilDclMobFieldModel\$mob_suffixes, ilDclBaseFieldRepresentation\getField(), and ilDclFileuploadFieldRepresentation\requiredWorkaroundForInputField().

12  {
13  $input = new ilFileInputGUI($this->getField()->getTitle(), 'field_' . $this->getField()->getId());
14  $input->setSuffixes(ilDclMobFieldModel::$mob_suffixes);
15  $input->setAllowDeletion(true);
16 
17  $this->requiredWorkaroundForInputField($input, $record_id);
18 
19  return $input;
20  }
This class represents a file property in a property form.
+ Here is the call graph for this function:

◆ passThroughFilter()

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

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

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

34  {
35  $value = $record->getRecordFieldValue($this->getField()->getId());
36 
37  $m_obj = new ilObjMediaObject($value, false);
38  $file_name = $m_obj->getTitle();
39  if (!$filter || strpos(strtolower($file_name), strtolower($filter)) !== false) {
40  return true;
41  }
42  return false;
43  }
Class ilObjMediaObject.
getRecordFieldValue($field_id)
Get Field Value.
+ Here is the call graph for this function:

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