ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilADTMultiTextDBBridge.php
Go to the documentation of this file.
1 <?php
2 
3 require_once "Services/ADT/classes/Bridges/class.ilADTMultiDBBridge.php";
4 
6 {
7  protected function isValidADT(ilADT $a_adt)
8  {
9  return ($a_adt instanceof ilADTMultiText);
10  }
11 
12  protected function readMultiRecord($a_set)
13  {
14  global $ilDB;
15 
16  $elements = array();
17 
18  while ($row = $ilDB->fetchAssoc($a_set)) {
19  $elements[] = $row[$this->getElementId()];
20  }
21 
22  $this->getADT()->setTextElements($elements);
23  }
24 
25  protected function prepareMultiInsert()
26  {
27  $res = array();
28 
29  foreach ((array) $this->getADT()->getTextElements() as $element) {
30  $res[] = array($this->getElementId() => array("text", $element));
31  }
32 
33  return $res;
34  }
35 }
getElementId()
Get element id.
ADT base class.
Definition: class.ilADT.php:11
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
global $ilDB