ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilDclFormulaRecordFieldModel Class Reference

Class ilDclBaseFieldModel. More...

+ Inheritance diagram for ilDclFormulaRecordFieldModel:
+ Collaboration diagram for ilDclFormulaRecordFieldModel:

Public Member Functions

 __construct (ilDclBaseRecordModel $record, ilDclBaseFieldModel $field)
 
 addHiddenItemsToConfirmation (ilConfirmationGUI &$confirmation)
 
 setValue ($value, $omit_parsing=false)
 Set value for record field. More...
 
 doUpdate ()
 Do nothing, value is runtime only and not stored in DB. More...
 
 doRead ()
 Do nothing, value is runtime only and not stored in DB. More...
 
 delete ()
 Do nothing, value is runtime only and not stored in DB. More...
 
 getFormInput ()
 
 getHTML ()
 
 getExportValue ()
 
 getValue ()
 
- Public Member Functions inherited from ilDclBaseRecordFieldModel
 __construct (ilDclBaseRecordModel $record, ilDclBaseFieldModel $field)
 
 doCreate ()
 Creates an Id and a database entry. More...
 
 doUpdate ()
 Update object in database. More...
 
 delete ()
 Delete record field in database. More...
 
 getValue ()
 
 getValueForRepresentation ()
 
 serializeData ($value)
 Serialize data before storing to db. More...
 
 deserializeData ($value)
 Deserialize data before applying to field. More...
 
 setValue ($value, $omit_parsing=false)
 Set value for record field. More...
 
 setValueFromForm ($form)
 
 parseExportValue ($value)
 Function to parse incoming data from form input value $value. More...
 
 getValueFromExcel ($excel, $row, $col)
 
 parseValue ($value)
 Function to parse incoming data from form input value $value. More...
 
 getExportValue ()
 
 fillExcelExport (ilExcel $worksheet, &$row, &$col)
 
 getPlainText ()
 
 getSortingValue ($link=true)
 
 addHiddenItemsToConfirmation (ilConfirmationGUI &$confirmation)
 
 parseSortingValue ($value, $link=true)
 Returns sortable value for the specific field-types. More...
 
 cloneStructure (ilDclBaseRecordFieldModel $old_record_field)
 
 afterClone ()
 
 getField ()
 
 getId ()
 
 getRecord ()
 
 getRecordRepresentation ()
 
 setRecordRepresentation ($record_representation)
 
 getFieldRepresentation ()
 
 setFieldRepresentation ($field_representation)
 

Protected Member Functions

 loadValue ()
 Do nothing, value is runtime only and not stored in DB. More...
 
 parse ()
 Parse expression. More...
 
- Protected Member Functions inherited from ilDclBaseRecordFieldModel
 doRead ()
 Read object data from database. More...
 
 loadValue ()
 Load the value. More...
 

Protected Attributes

 $expression = ''
 
 $parsed_value = ''
 
- Protected Attributes inherited from ilDclBaseRecordFieldModel
 $id
 
 $field
 
 $record
 
 $record_representation
 
 $field_representation
 
 $value
 
 $user
 
 $ctrl
 
 $db
 
 $lng
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilDclFormulaRecordFieldModel::__construct ( ilDclBaseRecordModel  $record,
ilDclBaseFieldModel  $field 
)
Parameters
ilDclBaseRecordModel$record
ilDclBaseFieldModel$field

Definition at line 35 of file class.ilDclFormulaRecordFieldModel.php.

References ilDclBaseRecordFieldModel\getField(), and ilDclBaseFieldModel\PROP_FORMULA_EXPRESSION.

35  {
36  parent::__construct($record, $field);
37 
38  $this->expression = $this->getField()->getProperty(ilDclBaseFieldModel::PROP_FORMULA_EXPRESSION);
39  }
+ Here is the call graph for this function:

Member Function Documentation

◆ addHiddenItemsToConfirmation()

ilDclFormulaRecordFieldModel::addHiddenItemsToConfirmation ( ilConfirmationGUI $confirmation)
Parameters
ilConfirmationGUI$confirmation

Definition at line 45 of file class.ilDclFormulaRecordFieldModel.php.

45  {
46  return;
47  }

◆ delete()

ilDclFormulaRecordFieldModel::delete ( )

Do nothing, value is runtime only and not stored in DB.

Definition at line 88 of file class.ilDclFormulaRecordFieldModel.php.

88  {
89  return NULL;
90  }

◆ doRead()

ilDclFormulaRecordFieldModel::doRead ( )

Do nothing, value is runtime only and not stored in DB.

Definition at line 80 of file class.ilDclFormulaRecordFieldModel.php.

80  {
81  return NULL;
82  }

◆ doUpdate()

ilDclFormulaRecordFieldModel::doUpdate ( )

Do nothing, value is runtime only and not stored in DB.

Definition at line 72 of file class.ilDclFormulaRecordFieldModel.php.

72  {
73  return NULL;
74  }

◆ getExportValue()

ilDclFormulaRecordFieldModel::getExportValue ( )
Returns
string

Definition at line 113 of file class.ilDclFormulaRecordFieldModel.php.

References parse().

113  {
114  return $this->parse();
115  }
+ Here is the call graph for this function:

◆ getFormInput()

ilDclFormulaRecordFieldModel::getFormInput ( )
Returns
mixed|string

Definition at line 97 of file class.ilDclFormulaRecordFieldModel.php.

References parse().

97  {
98  return $this->parse();
99  }
+ Here is the call graph for this function:

◆ getHTML()

ilDclFormulaRecordFieldModel::getHTML ( )
Returns
string

Definition at line 105 of file class.ilDclFormulaRecordFieldModel.php.

References parse().

105  {
106  return $this->parse();
107  }
+ Here is the call graph for this function:

◆ getValue()

ilDclFormulaRecordFieldModel::getValue ( )
Returns
string

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

References parse().

121  {
122  return $this->parse();
123  }
+ Here is the call graph for this function:

◆ loadValue()

ilDclFormulaRecordFieldModel::loadValue ( )
protected

Do nothing, value is runtime only and not stored in DB.

Definition at line 53 of file class.ilDclFormulaRecordFieldModel.php.

53  {
54  return NULL;
55  }

◆ parse()

ilDclFormulaRecordFieldModel::parse ( )
protected

Parse expression.

Returns
string

Definition at line 131 of file class.ilDclFormulaRecordFieldModel.php.

References $parsed_value, $parser, ilDclBaseRecordFieldModel\getField(), and ilDclBaseRecordFieldModel\getRecord().

Referenced by getExportValue(), getFormInput(), getHTML(), and getValue().

131  {
132  if (!$this->parsed_value && $this->expression) {
133  $parser = new ilDclExpressionParser($this->expression, $this->getRecord(), $this->getField());
134  try {
135  $this->parsed_value = $parser->parse();
136  } catch (ilException $e) {
137  return $this->lng->txt('dcl_error_parsing_expression') . ' (' . $e->getMessage() . ')';
138  }
139  }
140 
141  return $this->parsed_value;
142  }
Class ilDclExpressionParser.
Base class for ILIAS Exception handling.
$parser
Definition: BPMN2Parser.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setValue()

ilDclFormulaRecordFieldModel::setValue (   $value,
  $omit_parsing = false 
)

Set value for record field.

Parameters
mixed$value
bool$omit_parsingIf true, does not parse the value and stores it in the given format

Definition at line 64 of file class.ilDclFormulaRecordFieldModel.php.

References ilDclBaseRecordFieldModel\$value.

Field Documentation

◆ $expression

ilDclFormulaRecordFieldModel::$expression = ''
protected

Definition at line 23 of file class.ilDclFormulaRecordFieldModel.php.

◆ $parsed_value

ilDclFormulaRecordFieldModel::$parsed_value = ''
protected

Definition at line 28 of file class.ilDclFormulaRecordFieldModel.php.

Referenced by parse().


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