ILIAS  release_8 Revision v8.23
ilDclBooleanRecordRepresentation 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 ilDclBooleanRecordRepresentation:
+ Collaboration diagram for ilDclBooleanRecordRepresentation:

Public Member Functions

 getHTML (bool $link=true, array $options=[])
 Outputs html of a certain field. More...
 
- Public Member Functions inherited from ilDclBaseRecordRepresentation
 __construct (ilDclBaseRecordFieldModel $record_field)
 
 getFormGUI (ilPropertyFormGUI $formGUI)
 
 parseFormInput ($value)
 function parses stored value to the variable needed to fill into the form for editing. More...
 
 fillFormInput (ilPropertyFormGUI $form)
 Fills the form with the value of a record. More...
 
 getHTML (bool $link=true, array $options=[])
 Outputs html of a certain field. More...
 
 getSingleHTML (?array $options=null, bool $link=true)
 Returns data for single record view. More...
 
 getConfirmationHTML ()
 Returns data for confirmation list When returning false, attribute is ignored in list. More...
 
 fillRow (ilTemplate $tpl)
 Fills row with record data. More...
 
 getRecordField ()
 Get Record Field. More...
 
 getField ()
 Getter shortcut for field. More...
 
 getRecord ()
 Getter shortcut for record. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ilDclBaseRecordRepresentation
 getFormInput ()
 Gets the value from from the record field. More...
 
- Protected Attributes inherited from ilDclBaseRecordRepresentation
ilDclBaseRecordFieldModel $record_field
 
ilLanguage $lng
 
ilAccess $access
 
ilCtrl $ctrl
 
ILIAS HTTP Services $http
 
ILIAS Refinery Factory $refinery
 
ILIAS UI Renderer $renderer
 
ilObjUser $user
 

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.ilDclBooleanRecordRepresentation.php.

Member Function Documentation

◆ getHTML()

ilDclBooleanRecordRepresentation::getHTML ( bool  $link = true,
array  $options = [] 
)

Outputs html of a certain field.

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

References ilUtil\getImagePath(), ilDclBaseRecordRepresentation\getRecordField(), and ILIAS\Repository\lng().

24  : 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  }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:

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