ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilDclDateRecordFieldModel.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
26 public function parseValue($value): string
27 {
28 return (string) $value;
29 }
30
31 public function getValueFromExcel(ilExcel $excel, int $row, int $col): ?string
32 {
33 $value = parent::getValueFromExcel($excel, $row, $col);
34
35 if ($value) {
36 return date(ilDclDateFieldModel::FORMAT, strtotime($value));
37 } else {
38 return "";
39 }
40 }
41
45 public function parseSortingValue($value, bool $link = true): ?int
46 {
47 return strtotime($value);
48 }
49
50 public function getFormulaValue(): string
51 {
52 return (string) strtotime($this->getValue() ?: '');
53 }
54}
getValueFromExcel(ilExcel $excel, int $row, int $col)
parseSortingValue($value, bool $link=true)