ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilDclFormulaRecordFieldModel Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

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

Public Member Functions

 __construct (ilDclBaseRecordModel $record, ilDclBaseFieldModel $field)
 
 addHiddenItemsToConfirmation (ilConfirmationGUI $confirmation)
 
 setValue ($value, bool $omit_parsing=false)
 Set value for record field. More...
 
 doUpdate ()
 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, bool $omit_parsing=false)
 Set value for record field. More...
 
 setValueFromForm (ilPropertyFormGUI $form)
 
 getFormulaValue ()
 
 parseExportValue ($value)
 Function to parse incoming data from form input value $value. More...
 
 getValueFromExcel (ilExcel $excel, int $row, int $col)
 
 parseValue ($value)
 Function to parse incoming data from form input value $value. More...
 
 getExportValue ()
 
 fillExcelExport (ilExcel $worksheet, int &$row, int &$col)
 
 getPlainText ()
 
 getSortingValue (bool $link=true)
 
 addHiddenItemsToConfirmation (ilConfirmationGUI $confirmation)
 
 parseSortingValue ($value, bool $link=true)
 Returns sortable value for the specific field-types. More...
 
 cloneStructure (ilDclBaseRecordFieldModel $old_record_field)
 
 afterClone ()
 
 getField ()
 
 getId ()
 
 getRecord ()
 
 getRecordRepresentation ()
 
 setRecordRepresentation (ilDclBaseRecordRepresentation $record_representation)
 
 getFieldRepresentation ()
 
 setFieldRepresentation (ilDclBaseFieldRepresentation $field_representation)
 

Protected Member Functions

 loadValue ()
 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...
 
 parse ()
 Parse expression. More...
 
- Protected Member Functions inherited from ilDclBaseRecordFieldModel
 doRead ()
 Read object data from database. More...
 
 loadValue ()
 Load the value. More...
 

Protected Attributes

string $expression = ''
 
string $parsed_value = ''
 
- Protected Attributes inherited from ilDclBaseRecordFieldModel
int $id = null
 
ilDclBaseFieldModel $field
 
ilDclBaseRecordModel $record
 
ilDclBaseRecordRepresentation $record_representation = null
 
ilDclBaseFieldRepresentation $field_representation = null
 
 $value
 
ilObjUser $user
 
ilCtrl $ctrl
 
ilDBInterface $db
 
ilLanguage $lng
 
ILIAS HTTP Services $http
 
ILIAS Refinery Factory $refinery
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

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

Constructor & Destructor Documentation

◆ __construct()

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

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

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

25  {
26  parent::__construct($record, $field);
27 
28  $this->expression = (string) $this->getField()->getProperty(ilDclBaseFieldModel::PROP_FORMULA_EXPRESSION);
29  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ addHiddenItemsToConfirmation()

ilDclFormulaRecordFieldModel::addHiddenItemsToConfirmation ( ilConfirmationGUI  $confirmation)

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

31  : void
32  {
33  }

◆ delete()

ilDclFormulaRecordFieldModel::delete ( )

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

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

69  : void
70  {
71  }

◆ doRead()

ilDclFormulaRecordFieldModel::doRead ( )
protected

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

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

62  : void
63  {
64  }

◆ doUpdate()

ilDclFormulaRecordFieldModel::doUpdate ( )

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

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

55  : void
56  {
57  }

◆ getExportValue()

ilDclFormulaRecordFieldModel::getExportValue ( )

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

References parse().

83  : string
84  {
85  return $this->parse();
86  }
+ Here is the call graph for this function:

◆ getFormInput()

ilDclFormulaRecordFieldModel::getFormInput ( )

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

References parse().

73  : string
74  {
75  return $this->parse();
76  }
+ Here is the call graph for this function:

◆ getHTML()

ilDclFormulaRecordFieldModel::getHTML ( )

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

References parse().

78  : string
79  {
80  return $this->parse();
81  }
+ Here is the call graph for this function:

◆ getValue()

ilDclFormulaRecordFieldModel::getValue ( )

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

References parse().

88  : string
89  {
90  return $this->parse();
91  }
+ 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 38 of file class.ilDclFormulaRecordFieldModel.php.

38  : void
39  {
40  }

◆ parse()

ilDclFormulaRecordFieldModel::parse ( )
protected

Parse expression.

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

References Vendor\Package\$e, $parsed_value, ilDclBaseRecordFieldModel\getField(), ilDclBaseRecordFieldModel\getRecord(), and ILIAS\Repository\lng().

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

96  : string
97  {
98  if (!$this->parsed_value && $this->expression) {
99  $parser = new ilDclExpressionParser($this->expression, $this->getRecord(), $this->getField());
100  try {
101  $this->parsed_value = $parser->parse();
102  } catch (ilException $e) {
103  return $this->lng->txt('dcl_error_parsing_expression') . ' (' . $e->getMessage() . ')';
104  }
105  }
106 
107  return $this->parsed_value;
108  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setValue()

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

Set value for record field.

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

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

References ilDclBaseRecordFieldModel\$value.

47  : void
48  {
49  unset($value);
50  }

Field Documentation

◆ $expression

string ilDclFormulaRecordFieldModel::$expression = ''
protected

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

◆ $parsed_value

string ilDclFormulaRecordFieldModel::$parsed_value = ''
protected

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

Referenced by parse().


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