ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilDclBooleanRecordRepresentation Class Reference

Class ilDclBooleanRecordRepresentation. More...

+ Inheritance diagram for ilDclBooleanRecordRepresentation:
+ Collaboration diagram for ilDclBooleanRecordRepresentation:

Public Member Functions

 getHTML ($link=true)
 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 ($form)
 Fills the form with the value of a record. More...
 
 getHTML ($link=true)
 Outputs html of a certain field. More...
 
 getSingleHTML (array $options=null, $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
 $record_field
 
 $lng
 
 $access
 
 $ctrl
 

Detailed Description

Member Function Documentation

◆ getHTML()

ilDclBooleanRecordRepresentation::getHTML (   $link = true)

Outputs html of a certain field.

Parameters
mixed$value
bool | true$link
Returns
string

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

References ilUtil\getImagePath(), and ilDclBaseRecordRepresentation\getRecordField().

21  {
22  $value = $this->getRecordField()->getValue();
23  switch ($value) {
24  case 0:
25  $im = ilUtil::getImagePath('icon_not_ok.svg');
26  break;
27  case 1:
28  $im = ilUtil::getImagePath('icon_ok.svg');
29  break;
30  }
31 
32  return "<img src='" . $im . "'>";
33  }
static getImagePath($img, $module_path="", $mode="output", $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: