ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilDclTableViewFieldSetting Class Reference
+ Inheritance diagram for ilDclTableViewFieldSetting:
+ Collaboration diagram for ilDclTableViewFieldSetting:

Public Member Functions

 getTableviewId ()
 
 setTableviewId (int $tableview_id)
 
 getField ()
 
 setField (string $field)
 
 isVisibleInList ()
 
 setVisible (bool $visible)
 
 isInFilter ()
 
 setInFilter (bool $in_filter)
 
 getFilterValue ()
 
 setFilterValue ($filter_value)
 
 isFilterChangeable ()
 
 setFilterChangeable (bool $filter_changeable)
 
 getId ()
 
 setId (int $id)
 
 isRequiredCreate ()
 
 setRequiredCreate (bool $required_create)
 
 isLockedCreate ()
 
 setLockedCreate (bool $locked_create)
 
 isRequiredEdit ()
 
 setRequiredEdit (bool $required_edit)
 
 isLockedEdit ()
 
 setLockedEdit (bool $locked_edit)
 
 getDefaultValue ()
 
 setDefaultValue (?string $default_value)
 
 isVisibleCreate ()
 
 setVisibleCreate (bool $visible_create)
 
 setNotVisibleCreate (bool $not_visible_create)
 
 isNotVisibleCreate ()
 
 isVisibleEdit ()
 
 setVisibleEdit (bool $visible_edit)
 
 setNotVisibleEdit (bool $not_visible)
 
 isNotVisibleEdit ()
 
 isVisibleInForm (bool $creation_mode)
 
 isLocked (bool $creation_mode)
 
 isRequired (bool $creation_mode)
 
 sleep ($field_name)
 
 wakeUp ($field_name, $field_value)
 
 cloneStructure (ilDclTableViewFieldSetting $orig)
 
 getFieldObject ()
 
- Public Member Functions inherited from ActiveRecord
 getArConnector ()
 
 getArFieldList ()
 
 getConnectorContainerName ()
 @description Return the Name of your Connector Table More...
 
 setConnectorContainerName (string $connector_container_name)
 
 getPrimaryFieldValue ()
 
 setPrimaryFieldValue ($value)
 
 __construct (mixed $primary_key=0)
 
 storeObjectToCache ()
 
 asStdClass ()
 
 asArray ()
 
 buildFromArray (array $array)
 
 fixDateField ($field_name, string $value)
 
 sleep ($field_name)
 
 wakeUp ($field_name, $field_value)
 
 getArrayForConnector ()
 
 installConnector ()
 
 store ()
 
 save ()
 
 create ()
 
 copy (int $new_id=0)
 
 afterObjectLoad ()
 
 read ()
 
 update ()
 
 delete ()
 
 __call ($name, $arguments)
 

Static Public Member Functions

static returnDbTableName ()
 
static getTableViewFieldSetting (string $id, int $tableview_id)
 
static getInstance (int $tableview_id, int $field_id)
 
- Static Public Member Functions inherited from ActiveRecord
static returnDbTableName ()
 
static installDB ()
 
static renameDBField (string $old_name, string $new_name)
 
static tableExists ()
 
static fieldExists (string $field_name)
 
static removeDBField (string $field_name)
 
static updateDB ()
 
static resetDB ()
 
static truncateDB ()
 
static flushDB ()
 @depracated never use in ILIAS Core, Plugins only More...
 
static preloadObjects ()
 
static additionalParams (array $additional_params)
 
static findOrFail ($primary_key, array $add_constructor_args=[])
 Tries to find the object and throws an Exception if object is not found, instead of returning null. More...
 
static findOrGetInstance ($primary_key, array $add_constructor_args=[])
 
static where ($where, $operator=null)
 
static innerjoinAR (ActiveRecord $activeRecord, $on_this, string $on_external, array $fields=[' *'], string $operator='=', bool $both_external=false)
 
static innerjoin (string $tablename, $on_this, string $on_external, array $fields=[' *'], string $operator='=', bool $both_external=false)
 
static leftjoin (string $tablename, $on_this, string $on_external, array $fields=[' *'], string $operator='=', bool $both_external=false)
 
static orderBy (string $orderBy, string $orderDirection='ASC')
 
static dateFormat (string $date_format='d.m.Y - H:i:s')
 
static limit (int $start, int $end)
 
static affectedRows ()
 
static count ()
 
static get ()
 
static debug ()
 
static first ()
 
static getCollection ()
 
static last ()
 
static getFirstFromLastQuery ()
 
static connector (arConnector $arConnector)
 
static raw (bool $set_raw=true)
 
static getArray (?string $key=null, string|array|null $values=null)
 
static _toCamelCase (string $str, bool $capitalise_first_char=false)
 

Protected Attributes

int $id
 
int $tableview_id
 
string $field = ""
 
bool $visible = false
 
bool $in_filter = false
 
 $filter_value = ""
 
bool $filter_changeable = false
 
bool $required_create = false
 
bool $locked_create = false
 
string $default_value = null
 
bool $visible_create = false
 
bool $visible_edit = false
 
bool $required_edit = false
 
bool $locked_edit = false
 
- Protected Attributes inherited from ActiveRecord
bool $ar_safe_read = true
 
string $connector_container_name = ''
 
bool $is_new = true
 

Additional Inherited Members

- Protected Member Functions inherited from ActiveRecord
 installDatabase ()
 
- Static Protected Member Functions inherited from ActiveRecord
static getCalledClass ()
 @description Returns an instance of the instatiated calling active record (needs to be done in static methods) @TODO : This should be cached somehow More...
 
static fromCamelCase (string $str)
 

Detailed Description

Definition at line 21 of file class.ilDclTableViewFieldSetting.php.

Member Function Documentation

◆ cloneStructure()

ilDclTableViewFieldSetting::cloneStructure ( ilDclTableViewFieldSetting  $orig)

Definition at line 348 of file class.ilDclTableViewFieldSetting.php.

348 : int
349 {
351 $this->setInFilter($orig->isInFilter());
352 $this->setVisibleCreate($orig->isVisibleCreate());
353 $this->setVisibleEdit($orig->isVisibleEdit());
354 $this->setLockedCreate($orig->isLockedCreate());
355 $this->setLockedEdit($orig->isLockedEdit());
356 $this->setRequiredCreate($orig->isRequiredCreate());
357 $this->setRequiredEdit($orig->isRequiredEdit());
358 $filter_value = $orig->getFilterValue();
359 $this->setFilterValue($filter_value['filter_' . $orig->getField()] ?? $filter_value);
360 $this->setVisible($orig->isVisibleInList());
361 $this->create();
362 return $this->getId();
363 }

References $filter_value, ActiveRecord\create(), getField(), getFilterValue(), getId(), isFilterChangeable(), isInFilter(), isLockedCreate(), isLockedEdit(), isRequiredCreate(), isRequiredEdit(), isVisibleCreate(), isVisibleEdit(), isVisibleInList(), setFilterChangeable(), setFilterValue(), setInFilter(), setLockedCreate(), setLockedEdit(), setRequiredCreate(), setRequiredEdit(), setVisible(), setVisibleCreate(), and setVisibleEdit().

+ Here is the call graph for this function:

◆ getDefaultValue()

ilDclTableViewFieldSetting::getDefaultValue ( )

Definition at line 252 of file class.ilDclTableViewFieldSetting.php.

252 : ?string
253 {
255 }

References $default_value.

◆ getField()

ilDclTableViewFieldSetting::getField ( )

Definition at line 149 of file class.ilDclTableViewFieldSetting.php.

149 : string
150 {
151 return $this->field;
152 }

References $field.

Referenced by cloneStructure(), and wakeUp().

+ Here is the caller graph for this function:

◆ getFieldObject()

ilDclTableViewFieldSetting::getFieldObject ( )
Returns
ilDclBaseFieldModel|ilDclStandardField

Definition at line 368 of file class.ilDclTableViewFieldSetting.php.

369 {
370 if (is_numeric($this->field)) { //normal field
371 return ilDclCache::getFieldCache((int) $this->field);
372 } else { //standard field
373 global $DIC;
374 $lng = $DIC['lng'];
375 $stdfield = new ilDclStandardField();
376 $stdfield->setId($this->field);
377 $stdfield->setDatatypeId(ilDclStandardField::_getDatatypeForId($this->field));
378 $stdfield->setTitle($lng->txt('dcl_' . $this->field));
379
380 return $stdfield;
381 }
382 }
static getFieldCache(int $field_id=0)
static _getDatatypeForId(string $id)
gives you the datatype id of a specified standard field.
global $lng
Definition: privfeed.php:31
global $DIC
Definition: shib_login.php:26

References $DIC, $lng, ilDclStandardField\_getDatatypeForId(), and ilDclCache\getFieldCache().

+ Here is the call graph for this function:

◆ getFilterValue()

ilDclTableViewFieldSetting::getFilterValue ( )

Definition at line 182 of file class.ilDclTableViewFieldSetting.php.

183 {
184 return $this->filter_value;
185 }

References $filter_value.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ getId()

ilDclTableViewFieldSetting::getId ( )

Definition at line 202 of file class.ilDclTableViewFieldSetting.php.

202 : int
203 {
204 return $this->id;
205 }

References $id.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ getInstance()

static ilDclTableViewFieldSetting::getInstance ( int  $tableview_id,
int  $field_id 
)
static
Parameters
$tableview_id
$field_id
Returns
ActiveRecord|self

Definition at line 399 of file class.ilDclTableViewFieldSetting.php.

400 {
401 if (!($setting = self::where(['field' => $field_id, 'tableview_id' => $tableview_id])->first())) {
402 $setting = new self();
403 $setting->setField((string) $field_id);
404 $setting->setTableviewId($tableview_id);
405 }
406 return $setting;
407 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $tableview_id, and ActiveRecord\first().

+ Here is the call graph for this function:

◆ getTableViewFieldSetting()

static ilDclTableViewFieldSetting::getTableViewFieldSetting ( string  $id,
int  $tableview_id 
)
static
Returns
ActiveRecord|self

Definition at line 387 of file class.ilDclTableViewFieldSetting.php.

388 {
389 return parent::where(['field' => $id,
390 'tableview_id' => $tableview_id
391 ])->first();
392 }

References $id, $tableview_id, and ActiveRecord\first().

Referenced by ilDclBaseFieldModel\getViewSetting().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTableviewId()

ilDclTableViewFieldSetting::getTableviewId ( )

Definition at line 139 of file class.ilDclTableViewFieldSetting.php.

139 : int
140 {
141 return $this->tableview_id;
142 }

References $tableview_id.

◆ isFilterChangeable()

ilDclTableViewFieldSetting::isFilterChangeable ( )

Definition at line 192 of file class.ilDclTableViewFieldSetting.php.

192 : bool
193 {
195 }

References $filter_changeable.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ isInFilter()

ilDclTableViewFieldSetting::isInFilter ( )

Definition at line 172 of file class.ilDclTableViewFieldSetting.php.

172 : bool
173 {
174 return $this->in_filter;
175 }

References $in_filter.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ isLocked()

ilDclTableViewFieldSetting::isLocked ( bool  $creation_mode)

Definition at line 307 of file class.ilDclTableViewFieldSetting.php.

307 : bool
308 {
309 return $creation_mode ? $this->isLockedCreate() : $this->isLockedEdit();
310 }

References isLockedCreate(), and isLockedEdit().

+ Here is the call graph for this function:

◆ isLockedCreate()

ilDclTableViewFieldSetting::isLockedCreate ( )

Definition at line 222 of file class.ilDclTableViewFieldSetting.php.

222 : bool
223 {
225 }

References $locked_create.

Referenced by cloneStructure(), and isLocked().

+ Here is the caller graph for this function:

◆ isLockedEdit()

ilDclTableViewFieldSetting::isLockedEdit ( )

Definition at line 242 of file class.ilDclTableViewFieldSetting.php.

242 : bool
243 {
244 return $this->locked_edit;
245 }

References $locked_edit.

Referenced by cloneStructure(), and isLocked().

+ Here is the caller graph for this function:

◆ isNotVisibleCreate()

ilDclTableViewFieldSetting::isNotVisibleCreate ( )

Definition at line 277 of file class.ilDclTableViewFieldSetting.php.

277 : bool
278 {
279 return !$this->visible_create;
280 }

References $visible_create.

◆ isNotVisibleEdit()

ilDclTableViewFieldSetting::isNotVisibleEdit ( )

Definition at line 297 of file class.ilDclTableViewFieldSetting.php.

297 : bool
298 {
299 return !$this->visible_edit;
300 }

References $visible_edit.

◆ isRequired()

ilDclTableViewFieldSetting::isRequired ( bool  $creation_mode)

Definition at line 312 of file class.ilDclTableViewFieldSetting.php.

312 : bool
313 {
314 return $creation_mode ? $this->isRequiredCreate() : $this->isRequiredEdit();
315 }

References isRequiredCreate(), and isRequiredEdit().

+ Here is the call graph for this function:

◆ isRequiredCreate()

ilDclTableViewFieldSetting::isRequiredCreate ( )

Definition at line 212 of file class.ilDclTableViewFieldSetting.php.

212 : bool
213 {
215 }

References $required_create.

Referenced by cloneStructure(), and isRequired().

+ Here is the caller graph for this function:

◆ isRequiredEdit()

ilDclTableViewFieldSetting::isRequiredEdit ( )

Definition at line 232 of file class.ilDclTableViewFieldSetting.php.

232 : bool
233 {
235 }

References $required_edit.

Referenced by cloneStructure(), and isRequired().

+ Here is the caller graph for this function:

◆ isVisibleCreate()

ilDclTableViewFieldSetting::isVisibleCreate ( )

Definition at line 262 of file class.ilDclTableViewFieldSetting.php.

262 : bool
263 {
265 }

References $visible_create.

Referenced by cloneStructure(), and isVisibleInForm().

+ Here is the caller graph for this function:

◆ isVisibleEdit()

ilDclTableViewFieldSetting::isVisibleEdit ( )

Definition at line 282 of file class.ilDclTableViewFieldSetting.php.

282 : bool
283 {
284 return $this->visible_edit;
285 }

References $visible_edit.

Referenced by cloneStructure(), and isVisibleInForm().

+ Here is the caller graph for this function:

◆ isVisibleInForm()

ilDclTableViewFieldSetting::isVisibleInForm ( bool  $creation_mode)

Definition at line 302 of file class.ilDclTableViewFieldSetting.php.

302 : bool
303 {
304 return $creation_mode ? $this->isVisibleCreate() : $this->isVisibleEdit();
305 }

References isVisibleCreate(), and isVisibleEdit().

+ Here is the call graph for this function:

◆ isVisibleInList()

ilDclTableViewFieldSetting::isVisibleInList ( )

Definition at line 162 of file class.ilDclTableViewFieldSetting.php.

162 : bool
163 {
164 return $this->visible;
165 }

References $visible.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ returnDbTableName()

static ilDclTableViewFieldSetting::returnDbTableName ( )
static
Returns
string @description Return the Name of your Database Table

Reimplemented from ActiveRecord.

Definition at line 134 of file class.ilDclTableViewFieldSetting.php.

134 : string
135 {
136 return "il_dcl_tview_set";
137 }

◆ setDefaultValue()

ilDclTableViewFieldSetting::setDefaultValue ( ?string  $default_value)

Definition at line 257 of file class.ilDclTableViewFieldSetting.php.

257 : void
258 {
259 $this->default_value = $default_value;
260 }

References $default_value.

◆ setField()

ilDclTableViewFieldSetting::setField ( string  $field)
Parameters
$field

Definition at line 157 of file class.ilDclTableViewFieldSetting.php.

157 : void
158 {
159 $this->field = $field;
160 }

References $field.

◆ setFilterChangeable()

ilDclTableViewFieldSetting::setFilterChangeable ( bool  $filter_changeable)

Definition at line 197 of file class.ilDclTableViewFieldSetting.php.

197 : void
198 {
199 $this->filter_changeable = $filter_changeable;
200 }

References $filter_changeable.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ setFilterValue()

ilDclTableViewFieldSetting::setFilterValue (   $filter_value)

Definition at line 187 of file class.ilDclTableViewFieldSetting.php.

187 : void
188 {
189 $this->filter_value = $filter_value;
190 }

References $filter_value.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ setId()

ilDclTableViewFieldSetting::setId ( int  $id)

Definition at line 207 of file class.ilDclTableViewFieldSetting.php.

207 : void
208 {
209 $this->id = $id;
210 }

References $id.

◆ setInFilter()

ilDclTableViewFieldSetting::setInFilter ( bool  $in_filter)

Definition at line 177 of file class.ilDclTableViewFieldSetting.php.

177 : void
178 {
179 $this->in_filter = $in_filter;
180 }

References $in_filter.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ setLockedCreate()

ilDclTableViewFieldSetting::setLockedCreate ( bool  $locked_create)

Definition at line 227 of file class.ilDclTableViewFieldSetting.php.

227 : void
228 {
229 $this->locked_create = $locked_create;
230 }

References $locked_create.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ setLockedEdit()

ilDclTableViewFieldSetting::setLockedEdit ( bool  $locked_edit)

Definition at line 247 of file class.ilDclTableViewFieldSetting.php.

247 : void
248 {
249 $this->locked_edit = $locked_edit;
250 }

References $locked_edit.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ setNotVisibleCreate()

ilDclTableViewFieldSetting::setNotVisibleCreate ( bool  $not_visible_create)

Definition at line 272 of file class.ilDclTableViewFieldSetting.php.

272 : void
273 {
274 $this->visible_create = !$not_visible_create;
275 }

◆ setNotVisibleEdit()

ilDclTableViewFieldSetting::setNotVisibleEdit ( bool  $not_visible)

Definition at line 292 of file class.ilDclTableViewFieldSetting.php.

292 : void
293 {
294 $this->visible_edit = !$not_visible;
295 }

◆ setRequiredCreate()

ilDclTableViewFieldSetting::setRequiredCreate ( bool  $required_create)

Definition at line 217 of file class.ilDclTableViewFieldSetting.php.

217 : void
218 {
219 $this->required_create = $required_create;
220 }

References $required_create.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ setRequiredEdit()

ilDclTableViewFieldSetting::setRequiredEdit ( bool  $required_edit)

Definition at line 237 of file class.ilDclTableViewFieldSetting.php.

237 : void
238 {
239 $this->required_edit = $required_edit;
240 }

References $required_edit.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ setTableviewId()

ilDclTableViewFieldSetting::setTableviewId ( int  $tableview_id)

Definition at line 144 of file class.ilDclTableViewFieldSetting.php.

144 : void
145 {
146 $this->tableview_id = $tableview_id;
147 }

References $tableview_id.

◆ setVisible()

ilDclTableViewFieldSetting::setVisible ( bool  $visible)

Definition at line 167 of file class.ilDclTableViewFieldSetting.php.

167 : void
168 {
169 $this->visible = $visible;
170 }

References $visible.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ setVisibleCreate()

ilDclTableViewFieldSetting::setVisibleCreate ( bool  $visible_create)

Definition at line 267 of file class.ilDclTableViewFieldSetting.php.

267 : void
268 {
269 $this->visible_create = $visible_create;
270 }

References $visible_create.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ setVisibleEdit()

ilDclTableViewFieldSetting::setVisibleEdit ( bool  $visible_edit)

Definition at line 287 of file class.ilDclTableViewFieldSetting.php.

287 : void
288 {
289 $this->visible_edit = $visible_edit;
290 }

References $visible_edit.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ sleep()

ilDclTableViewFieldSetting::sleep (   $field_name)
Parameters
$field_name
Returns
null

Reimplemented from ActiveRecord.

Definition at line 317 of file class.ilDclTableViewFieldSetting.php.

317 : ?string
318 {
319 if ($field_name == 'filter_value' && is_array($this->filter_value)) {
320 return json_encode($this->filter_value);
321 }
322
323 return null;
324 }

◆ wakeUp()

ilDclTableViewFieldSetting::wakeUp (   $field_name,
  $field_value 
)
Parameters
$field_name
$field_value
Returns
null

Reimplemented from ActiveRecord.

Definition at line 326 of file class.ilDclTableViewFieldSetting.php.

326 : ?array
327 {
328 if ($field_name == 'filter_value') {
329 $return = [];
330 $json = null;
331 if ($field_value) {
332 $json = json_decode($field_value, true);
333 }
334 if (is_array($json)) {
335 foreach ($json as $key => $value) {
336 $return['filter_' . $this->getField() . '_' . $key] = $value;
337 }
338 } else {
339 $return = ['filter_' . $this->getField() => $field_value];
340 }
341
342 return $return;
343 }
344
345 return null;
346 }

References getField().

+ Here is the call graph for this function:

Field Documentation

◆ $default_value

string ilDclTableViewFieldSetting::$default_value = null
protected

Definition at line 98 of file class.ilDclTableViewFieldSetting.php.

Referenced by getDefaultValue(), and setDefaultValue().

◆ $field

string ilDclTableViewFieldSetting::$field = ""
protected

Definition at line 49 of file class.ilDclTableViewFieldSetting.php.

Referenced by getField(), and setField().

◆ $filter_changeable

bool ilDclTableViewFieldSetting::$filter_changeable = false
protected

Definition at line 77 of file class.ilDclTableViewFieldSetting.php.

Referenced by isFilterChangeable(), and setFilterChangeable().

◆ $filter_value

ilDclTableViewFieldSetting::$filter_value = ""
protected

◆ $id

int ilDclTableViewFieldSetting::$id
protected

Definition at line 33 of file class.ilDclTableViewFieldSetting.php.

Referenced by getId(), getTableViewFieldSetting(), and setId().

◆ $in_filter

bool ilDclTableViewFieldSetting::$in_filter = false
protected

Definition at line 63 of file class.ilDclTableViewFieldSetting.php.

Referenced by isInFilter(), and setInFilter().

◆ $locked_create

bool ilDclTableViewFieldSetting::$locked_create = false
protected

Definition at line 91 of file class.ilDclTableViewFieldSetting.php.

Referenced by isLockedCreate(), and setLockedCreate().

◆ $locked_edit

bool ilDclTableViewFieldSetting::$locked_edit = false
protected

Definition at line 128 of file class.ilDclTableViewFieldSetting.php.

Referenced by isLockedEdit(), and setLockedEdit().

◆ $required_create

bool ilDclTableViewFieldSetting::$required_create = false
protected

Definition at line 84 of file class.ilDclTableViewFieldSetting.php.

Referenced by isRequiredCreate(), and setRequiredCreate().

◆ $required_edit

bool ilDclTableViewFieldSetting::$required_edit = false
protected

Definition at line 121 of file class.ilDclTableViewFieldSetting.php.

Referenced by isRequiredEdit(), and setRequiredEdit().

◆ $tableview_id

int ilDclTableViewFieldSetting::$tableview_id
protected

◆ $visible

bool ilDclTableViewFieldSetting::$visible = false
protected

Definition at line 56 of file class.ilDclTableViewFieldSetting.php.

Referenced by isVisibleInList(), and setVisible().

◆ $visible_create

bool ilDclTableViewFieldSetting::$visible_create = false
protected

◆ $visible_edit

bool ilDclTableViewFieldSetting::$visible_edit = false
protected

The documentation for this class was generated from the following file: