ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilDclDateRecordRepresentation.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 public function getHTML(bool $link = true, array $options = []): string
24 {
25 $value = $this->getRecordField()->getValue();
26 if ($value == null) {
27 return $this->lng->txt('no_date');
28 }
29
30 return date($this->user->getDateFormat()->toString(), strtotime($value));
31 }
32
36 public function parseFormInput($value): ?string
37 {
38 return ($value === null) ? null : date(ilDclDateFieldModel::FORMAT, strtotime($value));
39 }
40}
getHTML(bool $link=true, array $options=[])
Outputs html of a certain field.