ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 32 of file class.ilDclFormulaRecordFieldModel.php.

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

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

Member Function Documentation

◆ addHiddenItemsToConfirmation()

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

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

44  {
45  return;
46  }

◆ delete()

ilDclFormulaRecordFieldModel::delete ( )

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

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

92  {
93  return null;
94  }

◆ doRead()

ilDclFormulaRecordFieldModel::doRead ( )

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

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

83  {
84  return null;
85  }

◆ doUpdate()

ilDclFormulaRecordFieldModel::doUpdate ( )

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

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

74  {
75  return null;
76  }

◆ getExportValue()

ilDclFormulaRecordFieldModel::getExportValue ( )
Returns
string

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

References parse().

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

◆ getFormInput()

ilDclFormulaRecordFieldModel::getFormInput ( )
Returns
mixed|string

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

References parse().

102  {
103  return $this->parse();
104  }
+ Here is the call graph for this function:

◆ getHTML()

ilDclFormulaRecordFieldModel::getHTML ( )
Returns
string

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

References parse().

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

◆ getValue()

ilDclFormulaRecordFieldModel::getValue ( )
Returns
string

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

References parse().

129  {
130  return $this->parse();
131  }
+ 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 52 of file class.ilDclFormulaRecordFieldModel.php.

53  {
54  return null;
55  }

◆ parse()

ilDclFormulaRecordFieldModel::parse ( )
protected

Parse expression.

Returns
string

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

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

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

140  {
141  if (!$this->parsed_value && $this->expression) {
142  $parser = new ilDclExpressionParser($this->expression, $this->getRecord(), $this->getField());
143  try {
144  $this->parsed_value = $parser->parse();
145  } catch (ilException $e) {
146  return $this->lng->txt('dcl_error_parsing_expression') . ' (' . $e->getMessage() . ')';
147  }
148  }
149 
150  return $this->parsed_value;
151  }
Class ilDclExpressionParser.
$parser
Definition: BPMN2Parser.php:23
+ 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 20 of file class.ilDclFormulaRecordFieldModel.php.

◆ $parsed_value

ilDclFormulaRecordFieldModel::$parsed_value = ''
protected

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

Referenced by parse().


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