ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilADTEnumDBBridge.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 protected function isValidADT(ilADT $a_adt): bool
24 {
25 return ($a_adt instanceof ilADTEnum);
26 }
27
28 public function readRecord(array $a_row): void
29 {
30 $this->getADT()->setSelection($a_row[$this->getElementId()]);
31 }
32
33 public function prepareInsert(array &$a_fields): void
34 {
35 $a_fields[$this->getElementId()] = [
37 $this->getADT()->getSelection()
38 ];
39 }
40
45 public function supportsDefaultValueColumn(): bool
46 {
47 return false;
48 }
49}
ADT DB bridge base class.
getElementId()
Get element id.
readRecord(array $a_row)
Import DB values to ADT.
prepareInsert(array &$a_fields)
Prepare ADT values for insert.
supportsDefaultValueColumn()
Column is value_index.
ADT base class.
Definition: class.ilADT.php:26