ILIAS  release_8 Revision v8.24
ilDclTableViewFieldSetting Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ 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 ($primary_key=0)
 
 storeObjectToCache ()
 
 asStdClass ()
 
 buildFromArray (array $array)
 
 fixDateField ($field_name, $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=array())
 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=array())
 
static where ($where, $operator=null)
 
static innerjoinAR (ActiveRecord $ar, $on_this, $on_external, array $fields=array(' *'), string $operator='=', $both_external=false)
 
static innerjoin ( $tablename, $on_this, $on_external, array $fields=array(' *'), string $operator='=', bool $both_external=false)
 
static leftjoin ( $tablename, $on_this, $on_external, array $fields=array(' *'), string $operator='=', bool $both_external=false)
 
static orderBy ($orderBy, string $orderDirection='ASC')
 
static dateFormat (string $date_format='d.m.Y - H:i:s')
 
static limit ($start, $end)
 
static affectedRows ()
 
static count ()
 
static get ()
 
static debug ()
 
static first ()
 
static getCollection ()
 
static last ()
 
static getFirstFromLastQuery ()
 
static connector (arConnector $connector)
 
static raw (bool $set_raw=true)
 
static getArray (?string $key=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

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

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

Member Function Documentation

◆ cloneStructure()

ilDclTableViewFieldSetting::cloneStructure ( ilDclTableViewFieldSetting  $orig)

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

347 : int
348 {
350 $this->setInFilter($orig->isInFilter());
351 $this->setVisibleCreate($orig->isVisibleCreate());
352 $this->setVisibleEdit($orig->isVisibleEdit());
353 $this->setLockedCreate($orig->isLockedCreate());
354 $this->setLockedEdit($orig->isLockedEdit());
355 $this->setRequiredCreate($orig->isRequiredCreate());
356 $this->setRequiredEdit($orig->isRequiredEdit());
357 $this->setFilterValue($orig->getFilterValue());
358 $this->setVisible($orig->isVisibleInList());
359 $this->create();
360 return $this->getId();
361 }

References ActiveRecord\create(), 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 250 of file class.ilDclTableViewFieldSetting.php.

250 : ?string
251 {
253 }

References $default_value.

◆ getField()

ilDclTableViewFieldSetting::getField ( )

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

147 : string
148 {
149 return $this->field;
150 }

References $field.

Referenced by wakeUp().

+ Here is the caller graph for this function:

◆ getFieldObject()

ilDclTableViewFieldSetting::getFieldObject ( )
Returns
ilDclBaseFieldModel|ilDclStandardField

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

367 {
368 if (is_numeric($this->field)) { //normal field
369 return ilDclCache::getFieldCache($this->field);
370 } else { //standard field
371 global $DIC;
372 $lng = $DIC['lng'];
373 $stdfield = new ilDclStandardField();
374 $stdfield->setId($this->field);
375 $stdfield->setDatatypeId(ilDclStandardField::_getDatatypeForId($this->field));
376 $stdfield->setTitle($lng->txt('dcl_' . $this->field));
377
378 return $stdfield;
379 }
380 }
static getFieldCache(int $field_id=0)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getDatatypeForId(string $id)
gives you the datatype id of a specified standard field.
global $DIC
Definition: feed.php:28
$lng

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

+ Here is the call graph for this function:

◆ getFilterValue()

ilDclTableViewFieldSetting::getFilterValue ( )

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

References $filter_value.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ getId()

ilDclTableViewFieldSetting::getId ( )

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

200 : int
201 {
202 return $this->id;
203 }

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 397 of file class.ilDclTableViewFieldSetting.php.

398 {
399 if (!($setting = self::where(array('field' => $field_id, 'tableview_id' => $tableview_id))->first())) {
400 $setting = new self();
401 $setting->setField($field_id);
402 $setting->setTableviewId($tableview_id);
403 }
404 return $setting;
405 }
Class ActiveRecord.

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 385 of file class.ilDclTableViewFieldSetting.php.

386 {
387 return parent::where(array('field' => $id,
388 'tableview_id' => $tableview_id
389 ))->first();
390 }

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 137 of file class.ilDclTableViewFieldSetting.php.

137 : int
138 {
139 return $this->tableview_id;
140 }

References $tableview_id.

◆ isFilterChangeable()

ilDclTableViewFieldSetting::isFilterChangeable ( )

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

190 : bool
191 {
193 }

References $filter_changeable.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ isInFilter()

ilDclTableViewFieldSetting::isInFilter ( )

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

170 : bool
171 {
172 return $this->in_filter;
173 }

References $in_filter.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ isLocked()

ilDclTableViewFieldSetting::isLocked ( bool  $creation_mode)

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

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

References isLockedCreate(), and isLockedEdit().

+ Here is the call graph for this function:

◆ isLockedCreate()

ilDclTableViewFieldSetting::isLockedCreate ( )

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

220 : bool
221 {
223 }

References $locked_create.

Referenced by cloneStructure(), and isLocked().

+ Here is the caller graph for this function:

◆ isLockedEdit()

ilDclTableViewFieldSetting::isLockedEdit ( )

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

240 : bool
241 {
242 return $this->locked_edit;
243 }

References $locked_edit.

Referenced by cloneStructure(), and isLocked().

+ Here is the caller graph for this function:

◆ isNotVisibleCreate()

ilDclTableViewFieldSetting::isNotVisibleCreate ( )

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

275 : bool
276 {
277 return !$this->visible_create;
278 }

References $visible_create.

◆ isNotVisibleEdit()

ilDclTableViewFieldSetting::isNotVisibleEdit ( )

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

295 : bool
296 {
297 return !$this->visible_edit;
298 }

References $visible_edit.

◆ isRequired()

ilDclTableViewFieldSetting::isRequired ( bool  $creation_mode)

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

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

References isRequiredCreate(), and isRequiredEdit().

+ Here is the call graph for this function:

◆ isRequiredCreate()

ilDclTableViewFieldSetting::isRequiredCreate ( )

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

210 : bool
211 {
213 }

References $required_create.

Referenced by cloneStructure(), and isRequired().

+ Here is the caller graph for this function:

◆ isRequiredEdit()

ilDclTableViewFieldSetting::isRequiredEdit ( )

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

230 : bool
231 {
233 }

References $required_edit.

Referenced by cloneStructure(), and isRequired().

+ Here is the caller graph for this function:

◆ isVisibleCreate()

ilDclTableViewFieldSetting::isVisibleCreate ( )

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

260 : bool
261 {
263 }

References $visible_create.

Referenced by cloneStructure(), and isVisibleInForm().

+ Here is the caller graph for this function:

◆ isVisibleEdit()

ilDclTableViewFieldSetting::isVisibleEdit ( )

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

280 : bool
281 {
282 return $this->visible_edit;
283 }

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 300 of file class.ilDclTableViewFieldSetting.php.

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

References isVisibleCreate(), and isVisibleEdit().

+ Here is the call graph for this function:

◆ isVisibleInList()

ilDclTableViewFieldSetting::isVisibleInList ( )

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

160 : bool
161 {
162 return $this->visible;
163 }

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 132 of file class.ilDclTableViewFieldSetting.php.

132 : string
133 {
134 return "il_dcl_tview_set";
135 }

◆ setDefaultValue()

ilDclTableViewFieldSetting::setDefaultValue ( ?string  $default_value)

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

255 : void
256 {
257 $this->default_value = $default_value;
258 }

References $default_value.

◆ setField()

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

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

155 : void
156 {
157 $this->field = $field;
158 }

References $field.

◆ setFilterChangeable()

ilDclTableViewFieldSetting::setFilterChangeable ( bool  $filter_changeable)

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

195 : void
196 {
197 $this->filter_changeable = $filter_changeable;
198 }

References $filter_changeable.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ setFilterValue()

ilDclTableViewFieldSetting::setFilterValue (   $filter_value)

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

185 : void
186 {
187 $this->filter_value = $filter_value;
188 }

References $filter_value.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ setId()

ilDclTableViewFieldSetting::setId ( int  $id)

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

205 : void
206 {
207 $this->id = $id;
208 }

References $id.

◆ setInFilter()

ilDclTableViewFieldSetting::setInFilter ( bool  $in_filter)

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

175 : void
176 {
177 $this->in_filter = $in_filter;
178 }

References $in_filter.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ setLockedCreate()

ilDclTableViewFieldSetting::setLockedCreate ( bool  $locked_create)

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

225 : void
226 {
227 $this->locked_create = $locked_create;
228 }

References $locked_create.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ setLockedEdit()

ilDclTableViewFieldSetting::setLockedEdit ( bool  $locked_edit)

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

245 : void
246 {
247 $this->locked_edit = $locked_edit;
248 }

References $locked_edit.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ setNotVisibleCreate()

ilDclTableViewFieldSetting::setNotVisibleCreate ( bool  $not_visible_create)

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

270 : void
271 {
272 $this->visible_create = !$not_visible_create;
273 }

◆ setNotVisibleEdit()

ilDclTableViewFieldSetting::setNotVisibleEdit ( bool  $not_visible)

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

290 : void
291 {
292 $this->visible_edit = !$not_visible;
293 }

◆ setRequiredCreate()

ilDclTableViewFieldSetting::setRequiredCreate ( bool  $required_create)

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

215 : void
216 {
217 $this->required_create = $required_create;
218 }

References $required_create.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ setRequiredEdit()

ilDclTableViewFieldSetting::setRequiredEdit ( bool  $required_edit)

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

235 : void
236 {
237 $this->required_edit = $required_edit;
238 }

References $required_edit.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ setTableviewId()

ilDclTableViewFieldSetting::setTableviewId ( int  $tableview_id)

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

142 : void
143 {
144 $this->tableview_id = $tableview_id;
145 }

References $tableview_id.

◆ setVisible()

ilDclTableViewFieldSetting::setVisible ( bool  $visible)

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

165 : void
166 {
167 $this->visible = $visible;
168 }

References $visible.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ setVisibleCreate()

ilDclTableViewFieldSetting::setVisibleCreate ( bool  $visible_create)

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

265 : void
266 {
267 $this->visible_create = $visible_create;
268 }

References $visible_create.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ setVisibleEdit()

ilDclTableViewFieldSetting::setVisibleEdit ( bool  $visible_edit)

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

285 : void
286 {
287 $this->visible_edit = $visible_edit;
288 }

References $visible_edit.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ sleep()

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

Reimplemented from ActiveRecord.

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

320 {
321 if ($field_name == 'filter_value' && is_array($this->filter_value)) {
322 return json_encode($this->filter_value);
323 }
324
325 return null;
326 }

◆ wakeUp()

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

Reimplemented from ActiveRecord.

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

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

References ILIAS\LTI\ToolProvider\$key, and getField().

+ Here is the call graph for this function:

Field Documentation

◆ $default_value

string ilDclTableViewFieldSetting::$default_value = null
protected

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

Referenced by getDefaultValue(), and setDefaultValue().

◆ $field

string ilDclTableViewFieldSetting::$field = ""
protected

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

Referenced by getField(), and setField().

◆ $filter_changeable

bool ilDclTableViewFieldSetting::$filter_changeable = false
protected

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

Referenced by isFilterChangeable(), and setFilterChangeable().

◆ $filter_value

ilDclTableViewFieldSetting::$filter_value = ""
protected

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

Referenced by getFilterValue(), and setFilterValue().

◆ $id

int ilDclTableViewFieldSetting::$id
protected

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

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

◆ $in_filter

bool ilDclTableViewFieldSetting::$in_filter = false
protected

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

Referenced by isInFilter(), and setInFilter().

◆ $locked_create

bool ilDclTableViewFieldSetting::$locked_create = false
protected

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

Referenced by isLockedCreate(), and setLockedCreate().

◆ $locked_edit

bool ilDclTableViewFieldSetting::$locked_edit = false
protected

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

Referenced by isLockedEdit(), and setLockedEdit().

◆ $required_create

bool ilDclTableViewFieldSetting::$required_create = false
protected

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

Referenced by isRequiredCreate(), and setRequiredCreate().

◆ $required_edit

bool ilDclTableViewFieldSetting::$required_edit = false
protected

Definition at line 119 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 54 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: