ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilDclBaseRecordRepresentation Class Reference
+ 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

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

Constructor & Destructor Documentation

◆ __construct()

ilDclBaseRecordRepresentation::__construct ( ilDclBaseRecordFieldModel  $record_field)

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

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

34  {
35  global $DIC;
36 
37  $this->lng = $DIC->language();
38  $this->access = $DIC->access();
39  $this->ctrl = $DIC->ctrl();
40  $this->http = $DIC->http();
41  $this->refinery = $DIC->refinery();
42  $this->factory = $DIC->ui()->factory();
43  $this->renderer = $DIC->ui()->renderer();
44  $this->user = $DIC->user();
45 
46  $this->record_field = $record_field;
47  }
factory()
renderer()
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:22
+ 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 67 of file class.ilDclBaseRecordRepresentation.php.

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

67  : void
68  {
69  $input_field = $form->getItemByPostVar('field_' . $this->getRecordField()->getField()->getId());
70  if ($input_field) {
71  $value = $this->getFormInput();
72  if (!is_null($value)) {
73  $input_field->setValueByArray(["field_" . $this->getRecordField()->getField()->getId() => $value]);
74  }
75  }
76  }
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 116 of file class.ilDclBaseRecordRepresentation.php.

116  : void
117  {
118  }

◆ getConfirmationHTML()

ilDclBaseRecordRepresentation::getConfirmationHTML ( )

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

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

References getHTML().

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

◆ getField()

◆ getFormGUI()

ilDclBaseRecordRepresentation::getFormGUI ( ilPropertyFormGUI  $formGUI)

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

49  : void
50  {
51  // Apply form-elements to record-entry-gui
52  }

◆ getFormInput()

ilDclBaseRecordRepresentation::getFormInput ( )
protected

Gets the value from from the record field.

Returns
int|string

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

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

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

83  {
84  return $this->parseFormInput($this->getRecordField()->getValue());
85  }
getValue()
Get the value that is displayed in the input client side.
Definition: Group.php:49
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 90 of file class.ilDclBaseRecordRepresentation.php.

References getRecordField().

Referenced by getConfirmationHTML(), and getSingleHTML().

90  : string
91  {
92  return (string) $this->getRecordField()->getValue();
93  }
+ 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 139 of file class.ilDclBaseRecordRepresentation.php.

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

140  {
141  return $this->record_field->getRecord();
142  }
+ 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 98 of file class.ilDclBaseRecordRepresentation.php.

References getHTML().

98  : string
99  {
100  return $this->getHTML($link, $options);
101  }
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 59 of file class.ilDclBaseRecordRepresentation.php.

Referenced by getFormInput().

60  {
61  return $value;
62  }
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilAccess ilDclBaseRecordRepresentation::$access
protected

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

◆ $ctrl

ilCtrl ilDclBaseRecordRepresentation::$ctrl
protected

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

◆ $factory

ILIAS UI Factory ilDclBaseRecordRepresentation::$factory
protected

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

◆ $http

ILIAS HTTP Services ilDclBaseRecordRepresentation::$http
protected

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

◆ $lng

ilLanguage ilDclBaseRecordRepresentation::$lng
protected

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

◆ $record_field

◆ $refinery

ILIAS Refinery Factory ilDclBaseRecordRepresentation::$refinery
protected

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

◆ $renderer

ILIAS UI Renderer ilDclBaseRecordRepresentation::$renderer
protected

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

◆ $user

ilObjUser ilDclBaseRecordRepresentation::$user
protected

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


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