ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilDclDatetimeRecordFieldModel 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 ilDclDatetimeRecordFieldModel:
+ Collaboration diagram for ilDclDatetimeRecordFieldModel:

Public Member Functions

 parseValue ($value)
 
 getValueFromExcel (ilExcel $excel, int $row, int $col)
 
 parseExportValue ($value)
 Function to parse incoming data from form input value $value. More...
 
 parseSortingValue ($value, bool $link=true)
 Returns sortable value for the specific field-types. More...
 
- 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)
 

Additional Inherited Members

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

Member Function Documentation

◆ getValueFromExcel()

ilDclDatetimeRecordFieldModel::getValueFromExcel ( ilExcel  $excel,
int  $row,
int  $col 
)

Definition at line 29 of file class.ilDclDatetimeRecordFieldModel.php.

References ilDclBaseRecordFieldModel\$value.

29  : ?string
30  {
31  $value = parent::getValueFromExcel($excel, $row, $col);
32 
33  return date('Y-m-d', strtotime($value));
34  }

◆ parseExportValue()

ilDclDatetimeRecordFieldModel::parseExportValue (   $value)

Function to parse incoming data from form input value $value.

returns the string/number/etc. to store in the database.

Parameters
string$value

Definition at line 40 of file class.ilDclDatetimeRecordFieldModel.php.

References ilDclBaseRecordFieldModel\$value, and IL_CAL_DATE.

40  : ?string
41  {
42  $date = new ilDate($value, IL_CAL_DATE);
43  return $date->get(IL_CAL_DATE);
44  }
const IL_CAL_DATE

◆ parseSortingValue()

ilDclDatetimeRecordFieldModel::parseSortingValue (   $value,
bool  $link = true 
)

Returns sortable value for the specific field-types.

Parameters
string$value

Definition at line 50 of file class.ilDclDatetimeRecordFieldModel.php.

References ilDclBaseRecordFieldModel\$value.

50  : ?int
51  {
52  return strtotime($value);
53  }

◆ parseValue()

ilDclDatetimeRecordFieldModel::parseValue (   $value)
Parameters
int | string | null$value

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

References ilDclBaseRecordFieldModel\$value.

24  : string
25  {
26  return (string) $value;
27  }

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