ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilDclTableFieldSetting.php
Go to the documentation of this file.
1 <?php
2 require_once('./Services/ActiveRecord/class.ActiveRecord.php');
3 
13 
25  protected $id;
34  protected $table_id;
44  protected $field;
52  protected $field_order;
60  protected $exportable;
61 
62 
67  static function returnDbTableName() {
68  return "il_dcl_tfield_set";
69  }
70 
71 
75  public function getId() {
76  return $this->id;
77  }
78 
79 
83  public function setId($id) {
84  $this->id = $id;
85  }
86 
87 
91  public function getTableId() {
92  return $this->table_id;
93  }
94 
95 
99  public function setTableId($table_id) {
100  $this->table_id = $table_id;
101  }
102 
103 
107  public function getField() {
108  return $this->field;
109  }
110 
111 
115  public function setField($field) {
116  $this->field = $field;
117  }
118 
119 
123  public function getFieldOrder() {
124  return $this->field_order;
125  }
126 
127 
131  public function setFieldOrder($field_order) {
132  $this->field_order = $field_order;
133  }
134 
135 
139  public function isExportable() {
140  return $this->exportable;
141  }
142 
143 
147  public function setExportable($exportable) {
148  $this->exportable = $exportable;
149  }
150 
151 
157  public static function getInstance($table_id, $field) {
158  $setting = self::where(array( 'table_id' => $table_id, 'field' => $field ))->first();
159  if (!$setting) {
160  $setting = new self();
161  $setting->setField($field);
162  $setting->setTableId($table_id);
163  }
164 
165  return $setting;
166  }
167 }
static getInstance($table_id, $field)
Class ActiveRecord.
Create styles array
The data for the language used.
Class ilDclTableFieldSetting.