ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilDclTableViewFieldSetting Class Reference

Class ilDclTableViewFieldSetting. More...

+ Inheritance diagram for ilDclTableViewFieldSetting:
+ Collaboration diagram for ilDclTableViewFieldSetting:

Public Member Functions

 getTableviewId ()
 
 setTableviewId ($tableview_id)
 
 getField ()
 
 setField ($field)
 
 isVisible ()
 
 setVisible ($visible)
 
 isInFilter ()
 
 setInFilter ($in_filter)
 
 getFilterValue ()
 
 setFilterValue ($filter_value)
 
 isFilterChangeable ()
 
 setFilterChangeable ($filter_changeable)
 
 getId ()
 
 setId ($id)
 
 sleep ($field_name)
 
 wakeUp ($field_name, $field_value)
 
 cloneStructure (ilDclTableViewFieldSetting $orig)
 
 getFieldObject ()
 
- Public Member Functions inherited from ActiveRecord
 getArConnector ()
 
 getArFieldList ()
 
 getConnectorContainerName ()
 
 setConnectorContainerName ($connector_container_name)
 
 getPrimaryFieldValue ()
 
 setPrimaryFieldValue ($value)
 
 __construct ($primary_key=0, arConnector $connector=null)
 
 storeObjectToCache ()
 
 __getConvertedDateFieldsAsArray ($format=null)
 
 __asCsv ($separator=';', $header=false)
 
 __asArray ()
 
 __asStdClass ()
 
 __asSerializedObject ()
 
 buildFromArray (array $array)
 
 fixDateField ($field_name, $value)
 
 sleep ($field_name)
 
 wakeUp ($field_name, $field_value)
 
 getArrayForDb ()
 
 getArrayForConnector ()
 
 installConnector ()
 
 store ()
 
 save ()
 
 create ()
 
 copy ($new_id=0)
 
 afterObjectLoad ()
 
 read ()
 
 update ()
 
 delete ()
 
 __call ($name, $arguments)
 

Static Public Member Functions

static returnDbTableName ()
 
static getInstance ($tableview_id, $field_id)
 
- Static Public Member Functions inherited from ActiveRecord
static returnDbTableName ()
 
static installDB ()
 
static renameDBField ($old_name, $new_name)
 
static tableExists ()
 
static fieldExists ($field_name)
 
static removeDBField ($field_name)
 
static updateDB ()
 
static resetDB ()
 
static truncateDB ()
 
static flushDB ()
 
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, $fields=array(' *'), $operator='=', $both_external=false)
 
static innerjoin ($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
 
static leftjoin ($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
 
static orderBy ($orderBy, $orderDirection='ASC')
 
static dateFormat ($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 ($set_raw=true)
 
static getArray ($key=null, $values=null)
 
static _toCamelCase ($str, $capitalise_first_char=false)
 

Protected Attributes

 $id
 
 $tableview_id
 
 $field
 
 $visible
 
 $in_filter
 
 $filter_value
 
 $filter_changeable
 
- Protected Attributes inherited from ActiveRecord
 $ar_safe_read = true
 
 $connector_container_name = ''
 

Additional Inherited Members

- Data Fields inherited from ActiveRecord
const ACTIVE_RECORD_VERSION = '2.0.7'
 
- Protected Member Functions inherited from ActiveRecord
 serializeToCSV ($field)
 This method is called for every field of your instance if you use __asCsv. More...
 
 installDatabase ()
 
- Static Protected Member Functions inherited from ActiveRecord
static getCalledClass ()
 
static fromCamelCase ($str)
 

Detailed Description

Class ilDclTableViewFieldSetting.

defines tableview/field specific settings: visible, in_filter, filter_value, filter_changeable

Author
Theodor Truffer tt@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

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

Member Function Documentation

◆ cloneStructure()

ilDclTableViewFieldSetting::cloneStructure ( ilDclTableViewFieldSetting  $orig)

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

References ActiveRecord\create(), getFilterValue(), isFilterChangeable(), isInFilter(), isVisible(), setFilterChangeable(), setFilterValue(), setInFilter(), and setVisible().

+ Here is the call graph for this function:

◆ getField()

ilDclTableViewFieldSetting::getField ( )
Returns
int

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

References $field.

Referenced by wakeUp().

+ Here is the caller graph for this function:

◆ getFieldObject()

ilDclTableViewFieldSetting::getFieldObject ( )
Returns
ilDclBaseFieldModel|ilDclStandardField

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

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

270  {
271  if (is_numeric($this->field)) { //normal field
272  return ilDclCache::getFieldCache($this->field);
273  } else { //standard field
274  global $DIC;
275  $lng = $DIC['lng'];
276  $stdfield = new ilDclStandardField();
277  $stdfield->setId($this->field);
278  $stdfield->setDatatypeId(ilDclStandardField::_getDatatypeForId($this->field));
279  $stdfield->setTitle($lng->txt('dcl_' . $this->field));
280 
281  return $stdfield;
282  }
283  }
global $DIC
Definition: saml.php:7
static getFieldCache($field_id=0)
static _getDatatypeForId($id)
gives you the datatype id of a specified standard field.
$lng
Class ilDclBaseFieldModel.
+ Here is the call graph for this function:

◆ getFilterValue()

ilDclTableViewFieldSetting::getFilterValue ( )
Returns
string

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

References $filter_value.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ getId()

ilDclTableViewFieldSetting::getId ( )
Returns
int

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

References $id.

◆ getInstance()

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

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

References $tableview_id, and ActiveRecord\first().

Referenced by ilDataCollectionDataSet\getXmlNamespace().

293  {
294  if ($setting = self::where(array('field' => $field_id, 'tableview_id' => $tableview_id))->first()) {
295  return $setting;
296  } else {
297  $setting = new self();
298  $setting->setField($field_id);
299  $setting->setTableviewId($tableview_id);
300 
301  return $setting;
302  }
303  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTableviewId()

ilDclTableViewFieldSetting::getTableviewId ( )
Returns
int

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

References $tableview_id.

◆ isFilterChangeable()

ilDclTableViewFieldSetting::isFilterChangeable ( )
Returns
boolean

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

References $filter_changeable.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ isInFilter()

ilDclTableViewFieldSetting::isInFilter ( )
Returns
boolean

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

References $in_filter.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ isVisible()

ilDclTableViewFieldSetting::isVisible ( )
Returns
boolean

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

References $visible.

Referenced by cloneStructure().

+ Here is the caller graph for this function:

◆ returnDbTableName()

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

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

84  {
85  return "il_dcl_tview_set";
86  }

◆ setField()

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

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

References $field.

120  {
121  $this->field = $field;
122  }

◆ setFilterChangeable()

ilDclTableViewFieldSetting::setFilterChangeable (   $filter_changeable)
Parameters
boolean$filter_changeable

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

References $filter_changeable.

Referenced by cloneStructure().

192  {
193  $this->filter_changeable = $filter_changeable;
194  }
+ Here is the caller graph for this function:

◆ setFilterValue()

ilDclTableViewFieldSetting::setFilterValue (   $filter_value)
Parameters
string$filter_value

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

References $filter_value.

Referenced by cloneStructure().

174  {
175  $this->filter_value = $filter_value;
176  }
+ Here is the caller graph for this function:

◆ setId()

ilDclTableViewFieldSetting::setId (   $id)
Parameters
int$id

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

References $id.

210  {
211  $this->id = $id;
212  }

◆ setInFilter()

ilDclTableViewFieldSetting::setInFilter (   $in_filter)
Parameters
boolean$in_filter

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

References $in_filter.

Referenced by cloneStructure().

156  {
157  $this->in_filter = $in_filter;
158  }
+ Here is the caller graph for this function:

◆ setTableviewId()

ilDclTableViewFieldSetting::setTableviewId (   $tableview_id)
Parameters
int$tableview_id

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

References $tableview_id.

102  {
103  $this->tableview_id = $tableview_id;
104  }

◆ setVisible()

ilDclTableViewFieldSetting::setVisible (   $visible)
Parameters
boolean$visible

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

References $visible.

Referenced by cloneStructure().

138  {
139  $this->visible = $visible;
140  }
+ Here is the caller graph for this function:

◆ sleep()

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

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

221  {
222  if ($field_name == 'filter_value' && is_array($this->filter_value)) {
223  return json_encode($this->filter_value);
224  }
225 
226  return null;
227  }

◆ wakeUp()

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

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

References $key, and getField().

237  {
238  if ($field_name == 'filter_value') {
239  $return = array();
240  $json = json_decode($field_value, true);
241  if (is_array($json)) {
242  foreach ($json as $key => $value) {
243  $return['filter_' . $this->getField() . '_' . $key] = $value;
244  }
245  } else {
246  $return = array('filter_' . $this->getField() => $field_value);
247  }
248 
249  return $return;
250  }
251 
252  return null;
253  }
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

Field Documentation

◆ $field

ilDclTableViewFieldSetting::$field
protected

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

Referenced by getField(), and setField().

◆ $filter_changeable

ilDclTableViewFieldSetting::$filter_changeable
protected

Definition at line 76 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

ilDclTableViewFieldSetting::$id
protected

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

Referenced by getId(), and setId().

◆ $in_filter

ilDclTableViewFieldSetting::$in_filter
protected

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

Referenced by isInFilter(), and setInFilter().

◆ $tableview_id

ilDclTableViewFieldSetting::$tableview_id
protected

◆ $visible

ilDclTableViewFieldSetting::$visible
protected

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

Referenced by isVisible(), and setVisible().


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