ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 241 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 111 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 252 of file class.ilDclTableViewFieldSetting.php.

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

253  {
254  if (is_numeric($this->field))
255  { //normal field
256  return ilDclCache::getFieldCache($this->field);
257  }
258  else
259  { //standard field
260  global $DIC;
261  $lng = $DIC['lng'];
262  $stdfield = new ilDclStandardField();
263  $stdfield->setId($this->field);
264  $stdfield->setDatatypeId(ilDclStandardField::_getDatatypeForId($this->field));
265  $stdfield->setTitle($lng->txt('dcl_'.$this->field));
266  return $stdfield;
267  }
268 
269  }
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
global $DIC
+ Here is the call graph for this function:

◆ getFilterValue()

ilDclTableViewFieldSetting::getFilterValue ( )
Returns
string

Definition at line 159 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 191 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 276 of file class.ilDclTableViewFieldSetting.php.

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

Referenced by ilDataCollectionDataSet\getXmlNamespace().

276  {
277  if ($setting = self::where(array('field' => $field_id, 'tableview_id' => $tableview_id))->first()) {
278  return $setting;
279  } else {
280  $setting = new self();
281  $setting->setField($field_id);
282  $setting->setTableviewId($tableview_id);
283  return $setting;
284  }
285  }
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 95 of file class.ilDclTableViewFieldSetting.php.

References $tableview_id.

◆ isFilterChangeable()

ilDclTableViewFieldSetting::isFilterChangeable ( )
Returns
boolean

Definition at line 175 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 143 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 127 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.

88  {
89  return "il_dcl_tview_set";
90  }

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

References $filter_changeable.

Referenced by cloneStructure().

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

◆ setFilterValue()

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

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

References $filter_value.

Referenced by cloneStructure().

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

◆ setId()

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

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

References $id.

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

◆ setInFilter()

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

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

References $in_filter.

Referenced by cloneStructure().

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

◆ setTableviewId()

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

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

References $tableview_id.

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

◆ setVisible()

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

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

References $visible.

Referenced by cloneStructure().

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

◆ sleep()

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

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

209  {
210  if ($field_name == 'filter_value' && is_array($this->filter_value))
211  {
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 array, and getField().

223  {
224  if ($field_name == 'filter_value')
225  {
226  $return = array();
227  $json = json_decode($field_value, true);
228  if (is_array($json))
229  {
230  foreach ($json as $key => $value) {
231  $return['filter_' . $this->getField() . '_' . $key] = $value;
232  }
233  } else {
234  $return = array('filter_' . $this->getField() => $field_value);
235  }
236  return $return;
237  }
238  return null;
239  }
Create styles array
The data for the language used.
+ 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: