ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 {
12  protected $record_field;
13  protected $lng;
14  protected $access;
15  protected $ctrl;
16 
17 
19  {
20  global $DIC;
21  $lng = $DIC['lng'];
22  $ilAccess = $DIC['ilAccess'];
23  $ilCtrl = $DIC['ilCtrl'];
24 
25  $this->lng = $lng;
26  $this->access = $ilAccess;
27  $this->ctrl = $ilCtrl;
28 
29  $this->record_field = $record_field;
30  }
31 
32 
33  public function getFormGUI(ilPropertyFormGUI $formGUI)
34  {
35  // Apply form-elements to record-entry-gui
36  }
37 
38 
46  public function parseFormInput($value)
47  {
48  return $value;
49  }
50 
51 
57  public function fillFormInput($form)
58  {
59  $input_field = $form->getItemByPostVar('field_' . $this->getRecordField()->getField()->getId());
60  if ($input_field) {
61  $value = $this->getFormInput();
62  $input_field->setValueByArray(array("field_" . $this->getRecordField()->getField()->getId() => $value));
63  }
64  }
65 
66 
72  protected function getFormInput()
73  {
74  return $this->parseFormInput($this->getRecordField()->getValue());
75  }
76 
77 
86  public function getHTML($link = true)
87  {
88  return $this->getRecordField()->getValue();
89  }
90 
91 
100  public function getSingleHTML(array $options = null, $link = true)
101  {
102  return $this->getHTML($link);
103  }
104 
105 
112  public function getConfirmationHTML()
113  {
114  return $this->getHTML();
115  }
116 
117 
123  public function fillRow(ilTemplate $tpl)
124  {
125  }
126 
127 
133  public function getRecordField()
134  {
135  return $this->record_field;
136  }
137 
138 
144  public function getField()
145  {
146  return $this->record_field->getField();
147  }
148 
149 
155  public function getRecord()
156  {
157  return $this->record_field->getRecord();
158  }
159 }
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 $DIC
Definition: saml.php:7
$tpl
Definition: ilias.php:10
global $ilCtrl
Definition: ilias.php:18
__construct(ilDclBaseRecordFieldModel $record_field)
getFormInput()
Gets the value from from the record field.
if(isset($_POST['submit'])) $form
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.
Class ilDclBaseRecordRepresentation.
getHTML($link=true)
Outputs html of a certain field.