ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 239 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 112 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 251 of file class.ilDclTableViewFieldSetting.php.

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

252  {
253  if (is_numeric($this->field)) { //normal field
254  return ilDclCache::getFieldCache($this->field);
255  } else { //standard field
256  global $DIC;
257  $lng = $DIC['lng'];
258  $stdfield = new ilDclStandardField();
259  $stdfield->setId($this->field);
260  $stdfield->setDatatypeId(ilDclStandardField::_getDatatypeForId($this->field));
261  $stdfield->setTitle($lng->txt('dcl_' . $this->field));
262  return $stdfield;
263  }
264  }
global $DIC
Definition: saml.php:7
static getFieldCache($field_id=0)
static _getDatatypeForId($id)
gives you the datatype id of a specified standard field.
Class ilDclBaseFieldModel.
global $lng
Definition: privfeed.php:17
+ Here is the call graph for this function:

◆ getFilterValue()

ilDclTableViewFieldSetting::getFilterValue ( )
Returns
string

Definition at line 160 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 192 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 271 of file class.ilDclTableViewFieldSetting.php.

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

Referenced by ilDataCollectionDataSet\getXmlNamespace().

272  {
273  if ($setting = self::where(array('field' => $field_id, 'tableview_id' => $tableview_id))->first()) {
274  return $setting;
275  } else {
276  $setting = new self();
277  $setting->setField($field_id);
278  $setting->setTableviewId($tableview_id);
279  return $setting;
280  }
281  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTableviewId()

ilDclTableViewFieldSetting::getTableviewId ( )
Returns
int

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

References $tableview_id.

◆ isFilterChangeable()

ilDclTableViewFieldSetting::isFilterChangeable ( )
Returns
boolean

Definition at line 176 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 144 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 88 of file class.ilDclTableViewFieldSetting.php.

89  {
90  return "il_dcl_tview_set";
91  }

◆ setField()

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

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

References $field.

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

◆ setFilterChangeable()

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

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

References $filter_changeable.

Referenced by cloneStructure().

185  {
186  $this->filter_changeable = $filter_changeable;
187  }
+ Here is the caller graph for this function:

◆ setFilterValue()

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

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

References $filter_value.

Referenced by cloneStructure().

169  {
170  $this->filter_value = $filter_value;
171  }
+ Here is the caller graph for this function:

◆ setId()

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

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

References $id.

201  {
202  $this->id = $id;
203  }

◆ setInFilter()

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

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

References $in_filter.

Referenced by cloneStructure().

153  {
154  $this->in_filter = $in_filter;
155  }
+ Here is the caller graph for this function:

◆ setTableviewId()

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

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

References $tableview_id.

105  {
106  $this->tableview_id = $tableview_id;
107  }

◆ setVisible()

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

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

References $visible.

Referenced by cloneStructure().

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

◆ sleep()

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

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

210  {
211  if ($field_name == 'filter_value' && is_array($this->filter_value)) {
212  return json_encode($this->filter_value);
213  }
214  return null;
215  }

◆ wakeUp()

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

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

References $key, array, and getField().

223  {
224  if ($field_name == 'filter_value') {
225  $return = array();
226  $json = json_decode($field_value, true);
227  if (is_array($json)) {
228  foreach ($json as $key => $value) {
229  $return['filter_' . $this->getField() . '_' . $key] = $value;
230  }
231  } else {
232  $return = array('filter_' . $this->getField() => $field_value);
233  }
234  return $return;
235  }
236  return null;
237  }
Create styles array
The data for the language used.
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

Field Documentation

◆ $field

ilDclTableViewFieldSetting::$field
protected

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

Referenced by getField(), and setField().

◆ $filter_changeable

ilDclTableViewFieldSetting::$filter_changeable
protected

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

Referenced by isFilterChangeable(), and setFilterChangeable().

◆ $filter_value

ilDclTableViewFieldSetting::$filter_value
protected

Definition at line 73 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 64 of file class.ilDclTableViewFieldSetting.php.

Referenced by isInFilter(), and setInFilter().

◆ $tableview_id

ilDclTableViewFieldSetting::$tableview_id
protected

◆ $visible

ilDclTableViewFieldSetting::$visible
protected

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

Referenced by isVisible(), and setVisible().


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