ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilDclTableFieldSetting.php
Go to the documentation of this file.
1<?php
2
12{
13
25 protected $id;
34 protected $table_id;
44 protected $field;
52 protected $field_order;
60 protected $exportable;
61
62
67 public static function returnDbTableName()
68 {
69 return "il_dcl_tfield_set";
70 }
71
72
76 public function getId()
77 {
78 return $this->id;
79 }
80
81
85 public function setId($id)
86 {
87 $this->id = $id;
88 }
89
90
94 public function getTableId()
95 {
96 return $this->table_id;
97 }
98
99
103 public function setTableId($table_id)
104 {
105 $this->table_id = $table_id;
106 }
107
108
112 public function getField()
113 {
114 return $this->field;
115 }
116
117
121 public function setField($field)
122 {
123 $this->field = $field;
124 }
125
126
130 public function getFieldOrder()
131 {
132 return $this->field_order;
133 }
134
135
140 {
141 $this->field_order = $field_order;
142 }
143
144
148 public function isExportable()
149 {
150 return $this->exportable;
151 }
152
153
157 public function setExportable($exportable)
158 {
159 $this->exportable = $exportable;
160 }
161
162
169 public static function getInstance($table_id, $field)
170 {
171 $setting = self::where(array('table_id' => $table_id, 'field' => $field))->first();
172 if (!$setting) {
173 $setting = new self();
174 $setting->setField($field);
175 $setting->setTableId($table_id);
176 }
177
178 return $setting;
179 }
180}
Class ActiveRecord.
static where($where, $operator=null)
An exception for terminatinating execution or to throw for unit testing.
Class ilDclTableFieldSetting.
static getInstance($table_id, $field)