31 $this->db = $DIC->database();
32 $this->lng = $DIC->language();
34 $this->glo_ref_id = $a_glo_ref_id;
44 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
47 foreach ($recs as $record_obj) {
48 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
50 $fields[$def->getFieldId()] =
array(
51 "id" => $def->getFieldId(),
52 "title" => $def->getTitle(),
53 "type" => $def->getType()
75 "SELECT * FROM glo_advmd_col_order " .
76 " WHERE glo_id = " .
$ilDB->quote($this->glo_id,
"integer") .
80 while ($rec =
$ilDB->fetchAssoc($set)) {
81 $order[$rec[
"field_id"]] = $rec[
"order_nr"];
85 if (!isset($order[0])) {
87 "text" =>
$lng->txt(
"cont_term"));
93 foreach ($order as
$id => $order_nr) {
94 if (isset($fields[
$id])) {
96 "text" => $fields[$id][
"title"]);
100 "text" =>
$lng->txt(
"cont_term"));
105 foreach ($fields as $f) {
107 "text" => $f[
"title"]);
124 "DELETE FROM glo_advmd_col_order WHERE " .
125 " glo_id = " .
$ilDB->quote($this->glo_id,
"integer")
130 foreach ($a_cols as $c) {
132 if (!isset($set[$c[
"id"]])) {
133 $ilDB->manipulate(
"INSERT INTO glo_advmd_col_order " .
134 "(glo_id, field_id, order_nr) VALUES (" .
135 $ilDB->quote($this->glo_id,
"integer") .
"," .
136 $ilDB->quote($c[
"id"],
"integer") .
"," .
137 $ilDB->quote($nr+=10,
"integer") .
139 $set[$c[
"id"]] = $c[
"id"];
154 $ilDB = $DIC->database();
157 "glo_advmd_col_order",
158 array(
"glo_id" =>
array(
"integer", $a_glo_id),
159 "field_id" =>
array(
"integer", $a_field_id)),
160 array(
"order_nr" =>
array(
"integer", $a_order_nr))
if(!array_key_exists('StateId', $_REQUEST)) $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
static getInstancesByRecordId($a_record_id, $a_only_searchable=false)
Get definitions by record id.
Create styles array
The data for the language used.