ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilDclFileRecordRepresentation Class Reference

AutoloadingIssuesInspection More...

+ Inheritance diagram for ilDclFileRecordRepresentation:
+ Collaboration diagram for ilDclFileRecordRepresentation:

Public Member Functions

 __construct (ilDclBaseRecordFieldModel $record_field)
 
 getSingleHTML (?array $options=null, bool $link=true)
 
 getHTML (bool $link=true, array $options=[])
 
 parseFormInput ($value)
 
- 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...
 

Private Member Functions

 buildDownloadLink ()
 

Private Attributes

ILIAS ResourceStorage Services $irss
 
ILIAS DI UIServices $ui_services
 

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

AutoloadingIssuesInspection

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

Constructor & Destructor Documentation

◆ __construct()

ilDclFileRecordRepresentation::__construct ( ilDclBaseRecordFieldModel  $record_field)

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

References $DIC, and ILIAS\GlobalScreen\Provider\__construct().

32  {
33  global $DIC;
34  parent::__construct($record_field);
35  $this->irss = $DIC->resourceStorage();
36  $this->ui_services = $DIC->ui();
37  }
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ buildDownloadLink()

ilDclFileRecordRepresentation::buildDownloadLink ( )
private

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

References ilDclBaseRecordRepresentation\$record_field, ILIAS\Repository\ctrl(), ilDclBaseRecordFieldModel\getField(), ilDclBaseRecordFieldModel\getRecord(), and ilDclBaseRecordRepresentation\getRecordField().

Referenced by getHTML().

82  : string
83  {
84  $record_field = $this->getRecordField();
85 
86  $this->ctrl->setParameterByClass(
87  ilDclRecordListGUI::class,
88  "record_id",
89  $record_field->getRecord()->getId()
90  );
91  $this->ctrl->setParameterByClass(
92  ilDclRecordListGUI::class,
93  "field_id",
94  $record_field->getField()->getId()
95  );
96  return $this->ctrl->getLinkTargetByClass(
97  ilDclRecordListGUI::class,
98  "sendFile"
99  );
100  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getHTML()

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

Definition at line 44 of file class.ilDclFileRecordRepresentation.php.

References buildDownloadLink(), ILIAS\Repository\lng(), and null.

Referenced by getSingleHTML().

44  : string
45  {
46  $value = $this->record_field->getValue();
47 
48  if ($value === null) {
49  return '';
50  }
51 
52  if (is_array($value)) {
53  return $value['name'] ?? 'undefined';
54  }
55 
56  $title = $this->valueToFileTitle($value);
57 
58  if ($title === '') {
59  return $this->lng->txt('file_not_found');
60  }
61 
62  if ($link) {
63  $link_component = $this->ui_services->factory()->link()->standard(
64  $title,
65  $this->buildDownloadLink()
66  );
67 
68  return $this->ui_services->renderer()->render($link_component);
69  }
70 
71  return $title;
72  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSingleHTML()

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

Definition at line 39 of file class.ilDclFileRecordRepresentation.php.

References getHTML().

39  : string
40  {
41  return $this->getHTML(true, $options ?? []);
42  }
getHTML(bool $link=true, array $options=[])
+ Here is the call graph for this function:

◆ parseFormInput()

ilDclFileRecordRepresentation::parseFormInput (   $value)

Definition at line 74 of file class.ilDclFileRecordRepresentation.php.

References null.

75  {
76  if ($value === null || is_array($value)) {
77  return '';
78  }
79  return $this->valueToFileTitle($value);
80  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

Field Documentation

◆ $irss

ILIAS ResourceStorage Services ilDclFileRecordRepresentation::$irss
private

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

◆ $ui_services

ILIAS DI UIServices ilDclFileRecordRepresentation::$ui_services
private

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


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