ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilDclFormulaRecordFieldModel Class Reference
+ 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 ()
 
 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...
 
 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

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

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ addHiddenItemsToConfirmation()

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

Reimplemented from ilDclBaseRecordFieldModel.

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

36 : void
37 {
38 }

◆ delete()

ilDclFormulaRecordFieldModel::delete ( )

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

Reimplemented from ilDclBaseRecordFieldModel.

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

74 : void
75 {
76 }

◆ doRead()

ilDclFormulaRecordFieldModel::doRead ( )
protected

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

Reimplemented from ilDclBaseRecordFieldModel.

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

67 : void
68 {
69 }

◆ doUpdate()

ilDclFormulaRecordFieldModel::doUpdate ( )

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

Reimplemented from ilDclBaseRecordFieldModel.

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

60 : void
61 {
62 }

◆ getExportValue()

ilDclFormulaRecordFieldModel::getExportValue ( )
Returns
int|string

Reimplemented from ilDclBaseRecordFieldModel.

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

88 : string
89 {
90 return $this->parse();
91 }

References parse().

+ Here is the call graph for this function:

◆ getFormInput()

ilDclFormulaRecordFieldModel::getFormInput ( )

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

78 : string
79 {
80 return $this->parse();
81 }

References parse().

+ Here is the call graph for this function:

◆ getHTML()

ilDclFormulaRecordFieldModel::getHTML ( )

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

83 : string
84 {
85 return $this->parse();
86 }

References parse().

+ Here is the call graph for this function:

◆ getValue()

ilDclFormulaRecordFieldModel::getValue ( )
Returns
string|array

Reimplemented from ilDclBaseRecordFieldModel.

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

93 : string
94 {
95 return $this->parse();
96 }

References parse().

+ Here is the call graph for this function:

◆ loadValue()

ilDclFormulaRecordFieldModel::loadValue ( )
protected

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

Reimplemented from ilDclBaseRecordFieldModel.

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

43 : void
44 {
45 }

◆ parse()

ilDclFormulaRecordFieldModel::parse ( )
protected

Parse expression.

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

101 : string
102 {
103 if (!$this->parsed_value && $this->expression) {
104 $substitution = new FieldSubstitution(
105 $this->getRecord(),
106 $this->getField()
107 );
108
109 $parser = new ExpressionParser(
110 $this->expression,
111 $substitution
112 );
113
114
115 //$parser = new ilDclExpressionParser($this->expression, $this->getRecord(), $this->getField());
116 try {
117 $this->parsed_value = $parser->parse();
118 } catch (ilException $e) {
119 return $this->lng->txt('dcl_error_parsing_expression') . ' (' . $e->getMessage() . ')';
120 }
121 }
122
123 return $this->parsed_value;
124 }
Base class for ILIAS Exception handling.

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

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

+ 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

Reimplemented from ilDclBaseRecordFieldModel.

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

52 : void
53 {
54 unset($value);
55 }

References ilDclBaseRecordFieldModel\$value.

Field Documentation

◆ $expression

string ilDclFormulaRecordFieldModel::$expression = ''
protected

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

◆ $parsed_value

string ilDclFormulaRecordFieldModel::$parsed_value = ''
protected

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

Referenced by parse().


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