29        $this->db = 
$DIC->database();
 
   30        $this->lng = 
$DIC->language();
 
   32        $this->glo_ref_id = $a_glo_ref_id;
 
   44        foreach ($recs as $record_obj) {
 
   46                $fields[$def->getFieldId()] = array(
 
   47                    "id" => $def->getFieldId(),
 
   48                    "title" => $def->getTitle(),
 
   49                    "type" => $def->getType()
 
   71            "SELECT * FROM glo_advmd_col_order " .
 
   72                " WHERE glo_id = " . 
$ilDB->quote($this->glo_id, 
"integer") .
 
   76        while ($rec = 
$ilDB->fetchAssoc($set)) {
 
   77            $order[$rec[
"field_id"]] = $rec[
"order_nr"];
 
   81        if (!isset($order[0])) {
 
   83                "text" => 
$lng->txt(
"cont_term"));
 
   89        foreach ($order as $id => $order_nr) {
 
   90            if (isset($fields[$id])) {
 
   92                    "text" => $fields[$id][
"title"]);
 
   96                    "text" => 
$lng->txt(
"cont_term"));
 
  101        foreach ($fields as 
$f) {
 
  103                "text" => 
$f[
"title"]);
 
  120            "DELETE FROM glo_advmd_col_order WHERE " .
 
  121            " glo_id = " . 
$ilDB->quote($this->glo_id, 
"integer")
 
  126        foreach ($a_cols as 
$c) {
 
  128            if (!isset($set[
$c[
"id"]])) {
 
  129                $ilDB->manipulate(
"INSERT INTO glo_advmd_col_order " .
 
  130                        "(glo_id, field_id, order_nr) VALUES (" .
 
  131                        $ilDB->quote($this->glo_id, 
"integer") . 
"," .
 
  132                        $ilDB->quote(
$c[
"id"], 
"integer") . 
"," .
 
  133                        $ilDB->quote($nr += 10, 
"integer") .
 
  135                $set[
$c[
"id"]] = 
$c[
"id"];
 
  153            "glo_advmd_col_order",
 
  154            array(
"glo_id" => array(
"integer", $a_glo_id),
 
  155                "field_id" => array(
"integer", $a_field_id)),
 
  156            array(
"order_nr" => array(
"integer", $a_order_nr))
 
An exception for terminatinating execution or to throw for unit testing.
static getInstancesByRecordId($a_record_id, $a_only_searchable=false)
Get definitions by record id.
static _getSelectedRecordsByObject($a_obj_type, $a_ref_id, $a_sub_type="")
Get selected records by object.
static _lookupObjectId($a_ref_id)
lookup object id