ILIAS  release_8 Revision v8.24
class.ilDclBooleanRecordRepresentation.php
Go to the documentation of this file.
1<?php
2
20{
24 public function getHTML(bool $link = true, array $options = []): string
25 {
26 $value = $this->getRecordField()->getValue();
27 switch ($value) {
28 case 0:
29 $icon = $this->factory->symbol()->icon()->custom(
30 ilUtil::getImagePath('icon_not_ok_monochrome.svg'),
31 $this->lng->txt("no")
32 );
33 break;
34 case 1:
35 $icon = $this->factory->symbol()->icon()->custom(
36 ilUtil::getImagePath('icon_ok_monochrome.svg'),
37 $this->lng->txt("yes")
38 );
39 break;
40 }
41
42 return $this->renderer->render($icon);
43 }
44}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getHTML(bool $link=true, array $options=[])
Outputs html of a certain field.
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)