ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilDclBaseRecordRepresentation 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 ilDclBaseRecordRepresentation:
+ Collaboration diagram for ilDclBaseRecordRepresentation:

Public Member Functions

 __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...
 

Protected Member Functions

 getFormInput ()
 Gets the value from from the record field. More...
 

Protected Attributes

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

Constructor & Destructor Documentation

◆ __construct()

ilDclBaseRecordRepresentation::__construct ( ilDclBaseRecordFieldModel  $record_field)

Definition at line 30 of file class.ilDclBaseRecordRepresentation.php.

References $DIC, $record_field, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ILIAS\Repository\user().

31  {
32  global $DIC;
33 
34  $this->lng = $DIC->language();
35  $this->access = $DIC->access();
36  $this->ctrl = $DIC->ctrl();
37  $this->http = $DIC->http();
38  $this->refinery = $DIC->refinery();
39  $this->factory = $DIC->ui()->factory();
40  $this->renderer = $DIC->ui()->renderer();
41  $this->user = $DIC->user();
42 
43  $this->record_field = $record_field;
44  }
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

Member Function Documentation

◆ fillFormInput()

ilDclBaseRecordRepresentation::fillFormInput ( ilPropertyFormGUI  $form)

Fills the form with the value of a record.

Definition at line 64 of file class.ilDclBaseRecordRepresentation.php.

References getField(), getFormInput(), ILIAS\Survey\Mode\getId(), ilPropertyFormGUI\getItemByPostVar(), and getRecordField().

64  : void
65  {
66  $input_field = $form->getItemByPostVar('field_' . $this->getRecordField()->getField()->getId());
67  if ($input_field) {
68  $value = $this->getFormInput();
69  if (!is_null($value)) {
70  $input_field->setValueByArray(array("field_" . $this->getRecordField()->getField()->getId() => $value));
71  }
72  }
73  }
getItemByPostVar(string $a_post_var)
getFormInput()
Gets the value from from the record field.
+ Here is the call graph for this function:

◆ fillRow()

ilDclBaseRecordRepresentation::fillRow ( ilTemplate  $tpl)

Fills row with record data.

Parameters
ilTemplate$tpl

Definition at line 113 of file class.ilDclBaseRecordRepresentation.php.

113  : void
114  {
115  }

◆ getConfirmationHTML()

ilDclBaseRecordRepresentation::getConfirmationHTML ( )

Returns data for confirmation list When returning false, attribute is ignored in list.

Definition at line 104 of file class.ilDclBaseRecordRepresentation.php.

References getHTML().

104  : string
105  {
106  return $this->getHTML();
107  }
getHTML(bool $link=true, array $options=[])
Outputs html of a certain field.
+ Here is the call graph for this function:

◆ getField()

ilDclBaseRecordRepresentation::getField ( )

Getter shortcut for field.

Definition at line 128 of file class.ilDclBaseRecordRepresentation.php.

Referenced by fillFormInput(), ilDclTextRecordRepresentation\fillFormInput(), ilDclRatingRecordRepresentation\getHTML(), ilDclTextRecordRepresentation\getHTML(), ilDclMobRecordRepresentation\getHTML(), ilDclFileuploadRecordRepresentation\getHTML(), ilDclSelectionRecordRepresentation\getHTML(), ilDclIliasReferenceRecordRepresentation\getSingleHTML(), and ilDclCopyRecordRepresentation\parseFormInput().

129  {
130  return $this->record_field->getField();
131  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getFormGUI()

ilDclBaseRecordRepresentation::getFormGUI ( ilPropertyFormGUI  $formGUI)

Definition at line 46 of file class.ilDclBaseRecordRepresentation.php.

46  : void
47  {
48  // Apply form-elements to record-entry-gui
49  }

◆ getFormInput()

ilDclBaseRecordRepresentation::getFormInput ( )
protected

Gets the value from from the record field.

Returns
int|string

Definition at line 79 of file class.ilDclBaseRecordRepresentation.php.

References getRecordField(), ILIAS\UI\Implementation\Component\Input\getValue(), and parseFormInput().

Referenced by fillFormInput(), and ilDclTextRecordRepresentation\fillFormInput().

80  {
81  return $this->parseFormInput($this->getRecordField()->getValue());
82  }
getValue()
Get the value that is displayed in the input client side.
Definition: Group.php:47
parseFormInput($value)
function parses stored value to the variable needed to fill into the form for editing.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getHTML()

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

Outputs html of a certain field.

Definition at line 87 of file class.ilDclBaseRecordRepresentation.php.

References getRecordField().

Referenced by getConfirmationHTML(), and getSingleHTML().

87  : string
88  {
89  return (string) $this->getRecordField()->getValue();
90  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRecord()

ilDclBaseRecordRepresentation::getRecord ( )

Getter shortcut for record.

Definition at line 136 of file class.ilDclBaseRecordRepresentation.php.

Referenced by ilDclRatingRecordRepresentation\getHTML(), ilDclTextRecordRepresentation\getHTML(), ilDclFileuploadRecordRepresentation\getHTML(), and ilDclMobRecordRepresentation\getHTML().

137  {
138  return $this->record_field->getRecord();
139  }
+ Here is the caller graph for this function:

◆ getRecordField()

◆ getSingleHTML()

ilDclBaseRecordRepresentation::getSingleHTML ( ?array  $options = null,
bool  $link = true 
)

Returns data for single record view.

Definition at line 95 of file class.ilDclBaseRecordRepresentation.php.

References getHTML().

95  : string
96  {
97  return $this->getHTML($link, $options);
98  }
getHTML(bool $link=true, array $options=[])
Outputs html of a certain field.
+ Here is the call graph for this function:

◆ parseFormInput()

ilDclBaseRecordRepresentation::parseFormInput (   $value)

function parses stored value to the variable needed to fill into the form for editing.

Parameters
string | int$value
Returns
string|int

Definition at line 56 of file class.ilDclBaseRecordRepresentation.php.

Referenced by getFormInput().

57  {
58  return $value;
59  }
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilAccess ilDclBaseRecordRepresentation::$access
protected

◆ $ctrl

ilCtrl ilDclBaseRecordRepresentation::$ctrl
protected

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

◆ $http

ILIAS HTTP Services ilDclBaseRecordRepresentation::$http
protected

Definition at line 25 of file class.ilDclBaseRecordRepresentation.php.

◆ $lng

ilLanguage ilDclBaseRecordRepresentation::$lng
protected

◆ $record_field

ilDclBaseRecordFieldModel ilDclBaseRecordRepresentation::$record_field
protected

◆ $refinery

ILIAS Refinery Factory ilDclBaseRecordRepresentation::$refinery
protected

Definition at line 26 of file class.ilDclBaseRecordRepresentation.php.

◆ $renderer

ILIAS UI Renderer ilDclBaseRecordRepresentation::$renderer
protected

Definition at line 27 of file class.ilDclBaseRecordRepresentation.php.

◆ $user

ilObjUser ilDclBaseRecordRepresentation::$user
protected

Definition at line 28 of file class.ilDclBaseRecordRepresentation.php.


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