ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 19 of file class.ilDclBooleanRecordRepresentation.php.

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

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