ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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)
 
 getFormulaValue ()
 
 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 30 of file class.ilDclFormulaRecordFieldModel.php.

References ILIAS\GlobalScreen\Provider\__construct(), ilDclBaseRecordFieldModel\getField(), and ilDclBaseFieldModel\PROP_FORMULA_EXPRESSION.

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

Member Function Documentation

◆ addHiddenItemsToConfirmation()

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

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

42  {
43  return;
44  }

◆ delete()

ilDclFormulaRecordFieldModel::delete ( )

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

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

90  {
91  return null;
92  }

◆ doRead()

ilDclFormulaRecordFieldModel::doRead ( )

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

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

81  {
82  return null;
83  }

◆ doUpdate()

ilDclFormulaRecordFieldModel::doUpdate ( )

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

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

72  {
73  return null;
74  }

◆ getExportValue()

ilDclFormulaRecordFieldModel::getExportValue ( )
Returns
string

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

References parse().

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

◆ getFormInput()

ilDclFormulaRecordFieldModel::getFormInput ( )
Returns
mixed|string

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

References parse().

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

◆ getHTML()

ilDclFormulaRecordFieldModel::getHTML ( )
Returns
string

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

References parse().

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

◆ getValue()

ilDclFormulaRecordFieldModel::getValue ( )
Returns
string

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

References parse().

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

51  {
52  return null;
53  }

◆ parse()

ilDclFormulaRecordFieldModel::parse ( )
protected

Parse expression.

Returns
string

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

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

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

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

References ilDclBaseRecordFieldModel\$value.

Field Documentation

◆ $expression

ilDclFormulaRecordFieldModel::$expression = ''
protected

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

◆ $parsed_value

ilDclFormulaRecordFieldModel::$parsed_value = ''
protected

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

Referenced by parse().


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