ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilDclDatetimeRecordRepresentation.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 {
24 
28  public function getHTML(bool $link = true, array $options = []): string
29  {
30  $value = $this->getRecordField()->getValue();
31  if ($value == '0000-00-00 00:00:00' || !$value) {
32  return $this->lng->txt('no_date');
33  }
34 
35  return $this->formatDateFromString($value);
36  }
37 
38  protected function getUserDateFormat(): string
39  {
40  return (string) $this->user->getDateFormat();
41  }
42 
47  public function parseFormInput($value): ?string
48  {
49  if (!$value || $value == "-") {
50  return null;
51  }
52 
53  return substr($value, 0, -9);
54  }
55 }
parseFormInput($value)
function parses stored value to the variable needed to fill into the form for editing.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getHTML(bool $link=true, array $options=[])
Outputs html of a certain field.