ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilDclBooleanRecordRepresentation Class Reference
+ 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
ILIAS UI Factory $factory
 
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

Definition at line 21 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 26 of file class.ilDclBooleanRecordRepresentation.php.

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

26  : string
27  {
28  $value = $this->getRecordField()->getValue();
29 
30  if ($value) {
31  $icon = $this->factory->symbol()->icon()->custom(
32  ilUtil::getImagePath('standard/icon_checked.svg'),
33  $this->lng->txt("yes")
34  );
35  } else {
36  $icon = $this->factory->symbol()->icon()->custom(
37  ilUtil::getImagePath('standard/icon_unchecked.svg'),
38  $this->lng->txt("no")
39  );
40  }
41 
42  return $this->renderer->render($icon);
43  }
factory()
renderer()
static getImagePath(string $image_name, 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: