ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilDclBaseRecordRepresentation.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
11  protected $record_field;
12  protected $lng;
13  protected $access;
14  protected $ctrl;
15 
17  global $DIC;
18  $lng = $DIC['lng'];
19  $ilAccess = $DIC['ilAccess'];
20  $ilCtrl = $DIC['ilCtrl'];
21 
22  $this->lng = $lng;
23  $this->access = $ilAccess;
24  $this->ctrl = $ilCtrl;
25 
26  $this->record_field = $record_field;
27  }
28 
29  public function getFormGUI(ilPropertyFormGUI $formGUI) {
30  // Apply form-elements to record-entry-gui
31  }
32 
33 
41  public function parseFormInput($value) {
42  return $value;
43  }
44 
45 
50  public function fillFormInput($form) {
51  $input_field = $form->getItemByPostVar('field_'.$this->getRecordField()->getField()->getId());
52  if($input_field) {
53  $value = $this->getFormInput();
54  $input_field->setValueByArray(array("field_".$this->getRecordField()->getField()->getId() => $value));
55  }
56  }
57 
58 
63  protected function getFormInput() {
64  return $this->parseFormInput($this->getRecordField()->getValue());
65  }
66 
67 
75  public function getHTML($link = true) {
76  return $this->getRecordField()->getValue();
77  }
78 
79 
87  public function getSingleHTML(array $options = null, $link = true) {
88  return $this->getHTML($link);
89  }
90 
91 
97  public function getConfirmationHTML() {
98  return $this->getHTML();
99  }
100 
105  public function fillRow(ilTemplate $tpl) {
106 
107  }
108 
109 
114  public function getRecordField() {
115  return $this->record_field;
116  }
117 
118 
123  public function getField() {
124  return $this->record_field->getField();
125  }
126 
131  public function getRecord() {
132  return $this->record_field->getRecord();
133  }
134 }
fillRow(ilTemplate $tpl)
Fills row with record data.
This class represents a property form user interface.
fillFormInput($form)
Fills the form with the value of a record.
global $tpl
Definition: ilias.php:8
global $ilCtrl
Definition: ilias.php:18
__construct(ilDclBaseRecordFieldModel $record_field)
getFormInput()
Gets the value from from the record field.
if(!is_array($argv)) $options
special template class to simplify handling of ITX/PEAR
getSingleHTML(array $options=null, $link=true)
Returns data for single record view.
parseFormInput($value)
function parses stored value to the variable needed to fill into the form for editing.
getConfirmationHTML()
Returns data for confirmation list When returning false, attribute is ignored in list.
Create styles array
The data for the language used.
Class ilDclBaseRecordRepresentation.
getHTML($link=true)
Outputs html of a certain field.
global $DIC