35 $this->db = $DIC->database();
36 $this->
lng = $DIC->language();
38 $this->glo_ref_id = $a_glo_ref_id;
54 foreach ($recs as $record_obj) {
56 $fields[$def->getFieldId()] = array(
57 "id" => $def->getFieldId(),
58 "title" => $def->getTitle(),
59 "type" => $def->getType()
78 "SELECT * FROM glo_advmd_col_order " .
79 " WHERE glo_id = " .
$ilDB->quote($this->glo_id,
"integer") .
83 while ($rec =
$ilDB->fetchAssoc($set)) {
84 $order[$rec[
"field_id"]] = $rec[
"order_nr"];
87 if (!isset($order[0])) {
88 $columns[] = array(
"id" => 0,
89 "text" => $lng->
txt(
"cont_term"));
95 foreach ($order as
$id => $order_nr) {
96 if (isset($fields[
$id])) {
97 $columns[] = array(
"id" => $id,
98 "text" => $fields[$id][
"title"]);
100 } elseif ($id == 0) {
101 $columns[] = array(
"id" => 0,
102 "text" => $lng->
txt(
"cont_term"));
107 foreach ($fields as
$f) {
108 $columns[] = array(
"id" => $f[
"id"],
109 "text" => $f[
"title"]);
125 "DELETE FROM glo_advmd_col_order WHERE " .
126 " glo_id = " .
$ilDB->quote($this->glo_id,
"integer")
131 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))
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _getSelectedRecordsByObject(string $a_obj_type, int $a_id, string $a_sub_type="", bool $is_ref_id=true)
static getInstancesByRecordId( $a_record_id, $a_only_searchable=false, string $language='')
Get definitions by record id.
static _lookupObjectId(int $ref_id)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins