ILIAS  release_8 Revision v8.24
class.ilADTExternalLinkDBBridge.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
5/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
6
13{
19 protected function isValidADT(ilADT $a_adt): bool
20 {
21 return $a_adt instanceof ilADTExternalLink;
22 }
23
28 public function readRecord(array $a_row): void
29 {
30 $this->getADT()->setUrl($a_row[$this->getElementId() . '_value']);
31 $this->getADT()->setTitle($a_row[$this->getElementId() . '_title']);
32 }
33
38 public function prepareInsert(array &$a_fields): void
39 {
40 $a_fields[$this->getElementId() . '_value'] = ["text", $this->getADT()->getUrl()];
41 $a_fields[$this->getElementId() . '_title'] = ['text', $this->getADT()->getTitle()];
42 }
43
47 public function supportsDefaultValueColumn(): bool
48 {
49 return false;
50 }
51}
ADT DB bridge base class.
getElementId()
Get element id.
Abstract external link db bridge.
isValidADT(ilADT $a_adt)
check valid type
prepareInsert(array &$a_fields)
prepare insert
ADT base class.
Definition: class.ilADT.php:12