29 $this->db = $DIC->database();
83 $this->foreign_id = $a_val;
93 return $this->foreign_id;
103 $this->import_id = $a_val;
123 $this->title = $a_val;
143 $nid =
$ilDB->nextId(
"mep_item");
144 $ilDB->manipulate(
"INSERT INTO mep_item " .
145 "(obj_id, type, foreign_id, title, import_id) VALUES (" .
146 $ilDB->quote($nid,
"integer") .
"," .
163 "SELECT * FROM mep_item WHERE " .
164 "obj_id = " .
$ilDB->quote($this->getId(),
"integer")
166 if ($rec =
$ilDB->fetchAssoc($set)) {
185 "UPDATE mep_item SET " .
186 " type = " .
$ilDB->quote($this->getType(),
"text") .
"," .
187 " foreign_id = " .
$ilDB->quote($this->getForeignId(),
"integer") .
"," .
188 " title = " .
$ilDB->quote($this->getTitle(),
"text") .
"," .
189 " import_id = " .
$ilDB->quote($this->getImportId(),
"text") .
190 " WHERE obj_id = " .
$ilDB->quote($this->getId(),
"integer")
200 public function delete()
205 "DELETE FROM mep_item WHERE " 206 .
" obj_id = " .
$ilDB->quote($this->getId(),
"integer")
216 private static function lookup($a_id, $a_field)
220 $ilDB = $DIC->database();
222 $set =
$ilDB->query(
"SELECT " . $a_field .
" FROM mep_item WHERE " .
223 " obj_id = " .
$ilDB->quote($a_id,
"integer"));
224 if ($rec =
$ilDB->fetchAssoc($set)) {
225 return $rec[$a_field];
237 return self::lookup($a_id,
"foreign_id");
247 return self::lookup($a_id,
"type");
257 return self::lookup($a_id,
"title");
270 $ilDB = $DIC->database();
275 "UPDATE mep_item SET " .
277 " WHERE foreign_id = " .
$ilDB->quote($a_obj,
"integer") .
278 " AND type = " .
$ilDB->quote(
"mob",
"text")
290 $ilDB = $DIC->database();
293 "SELECT * FROM mep_tree " .
294 " WHERE child = " .
$ilDB->quote($a_id,
"integer")
297 while ($rec =
$ilDB->fetchAssoc($set)) {
298 $pool_ids[] = $rec[
"mep_id"];
313 $ilDB = $DIC->database();
316 "SELECT mep_tree.child as id" .
317 " FROM mep_tree JOIN mep_item ON (mep_tree.child = mep_item.obj_id) WHERE " .
318 " mep_tree.mep_id = " .
$ilDB->quote($a_id,
"integer") .
" AND " .
323 while ($rec =
$ilDB->fetchAssoc($set)) {
if(!array_key_exists('StateId', $_REQUEST)) $id
static _lookupTitle($a_id)
lookup object title
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type