ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilADTEnumDBBridge.php
Go to the documentation of this file.
1 <?php
2 
3 require_once "Services/ADT/classes/Bridges/class.ilADTDBBridge.php";
4 
6 {
7  protected function isValidADT(ilADT $a_adt)
8  {
9  return ($a_adt instanceof ilADTEnum);
10  }
11 
12  // CRUD
13 
14  public function readRecord(array $a_row)
15  {
16  $this->getADT()->setSelection($a_row[$this->getElementId()]);
17  }
18 
19  public function prepareInsert(array &$a_fields)
20  {
21  $type = ($this->getADT() instanceof ilADTEnumNumeric)
22  ? "integer"
23  : "text";
24  $a_fields[$this->getElementId()] = array($type, $this->getADT()->getSelection());
25  }
26 }
$type
getElementId()
Get element id.
ADT base class.
Definition: class.ilADT.php:11
ADT DB bridge base class.
Create styles array
The data for the language used.
prepareInsert(array &$a_fields)