76 $this->foreign_id = $a_val;
86 return $this->foreign_id;
96 $this->import_id = $a_val;
116 $this->title = $a_val;
136 $nid = $ilDB->nextId(
"mep_item");
137 $ilDB->manipulate(
"INSERT INTO mep_item ".
138 "(obj_id, type, foreign_id, title, import_id) VALUES (".
139 $ilDB->quote($nid,
"integer").
",".
140 $ilDB->quote($this->
getType(),
"text").
",".
142 $ilDB->quote($this->
getTitle(),
"text").
",".
155 $set = $ilDB->query(
"SELECT * FROM mep_item WHERE ".
156 "obj_id = ".$ilDB->quote($this->getId(),
"integer")
158 if ($rec = $ilDB->fetchAssoc($set))
177 $ilDB->manipulate(
"UPDATE mep_item SET ".
178 " type = ".$ilDB->quote($this->getType(),
"text").
",".
179 " foreign_id = ".$ilDB->quote($this->getForeignId(),
"integer").
",".
180 " title = ".$ilDB->quote($this->getTitle(),
"text").
",".
181 " import_id = ".$ilDB->quote($this->getImportId(),
"text").
182 " WHERE obj_id = ".$ilDB->quote($this->getId(),
"integer")
196 $ilDB->manipulate(
"DELETE FROM mep_item WHERE " 197 .
" obj_id = ".$ilDB->quote($this->getId(),
"integer")
207 private static function lookup($a_id, $a_field)
211 $set = $ilDB->query(
"SELECT ".$a_field.
" FROM mep_item WHERE ".
212 " obj_id = ".$ilDB->quote($a_id,
"integer"));
213 if ($rec = $ilDB->fetchAssoc($set))
215 return $rec[$a_field];
227 return self::lookup($a_id,
"foreign_id");
237 return self::lookup($a_id,
"type");
247 return self::lookup($a_id,
"title");
263 $ilDB->manipulate(
"UPDATE mep_item SET ".
264 " title = ".$ilDB->quote(
$title,
"text").
265 " WHERE foreign_id = ".$ilDB->quote($a_obj,
"integer").
266 " AND type = ".$ilDB->quote(
"mob",
"text")
278 $set = $ilDB->query(
"SELECT * FROM mep_tree ".
279 " WHERE child = ".$ilDB->quote($a_id,
"integer")
282 while ($rec = $ilDB->fetchAssoc($set))
284 $pool_ids[] = $rec[
"mep_id"];
299 $set = $ilDB->query(
"SELECT mep_tree.child as id".
300 " FROM mep_tree JOIN mep_item ON (mep_tree.child = mep_item.obj_id) WHERE ".
301 " mep_tree.mep_id = ".$ilDB->quote($a_id,
"integer").
" AND ".
302 " mep_item.type = ".$ilDB->quote(
$a_type,
"text")
306 while ($rec = $ilDB->fetchAssoc($set))
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