ILIAS  release_8 Revision v8.24
class.ilDclTableFieldSetting.php
Go to the documentation of this file.
1<?php
2
20{
31 protected ?int $id;
39 protected int $table_id;
47 protected string $field;
54 protected int $field_order = 0;
61 protected bool $exportable = false;
62
66 public static function returnDbTableName(): string
67 {
68 return "il_dcl_tfield_set";
69 }
70
71 public function getId(): int
72 {
73 return $this->id;
74 }
75
76 public function setId(int $id): void
77 {
78 $this->id = $id;
79 }
80
81 public function getTableId(): int
82 {
83 return $this->table_id;
84 }
85
86 public function setTableId(int $table_id): void
87 {
88 $this->table_id = $table_id;
89 }
90
91 public function getField(): string
92 {
93 return $this->field;
94 }
95
96 public function setField(string $field): void
97 {
98 $this->field = $field;
99 }
100
101 public function getFieldOrder(): int
102 {
103 return $this->field_order;
104 }
105
106 public function setFieldOrder(int $field_order): void
107 {
108 $this->field_order = $field_order;
109 }
110
111 public function isExportable(): bool
112 {
113 return $this->exportable;
114 }
115
116 public function setExportable(bool $exportable): void
117 {
118 $this->exportable = $exportable;
119 }
120
124 public static function getInstance(int $table_id, string $field): ActiveRecord
125 {
126 $setting = self::where(array('table_id' => $table_id, 'field' => $field))->first();
127 if (!$setting) {
128 $setting = new self();
129 $setting->setField($field);
130 $setting->setTableId($table_id);
131 }
132
133 return $setting;
134 }
135}
Class ActiveRecord.
static where($where, $operator=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance(int $table_id, string $field)
static returnDbTableName()
@description Return the Name of your Database Table