19declare(strict_types=1);
26 use ilDclFileFieldHelper;
28 private \ILIAS\ResourceStorage\Services
$irss;
35 $this->irss =
$DIC->resourceStorage();
36 $this->ui_services =
$DIC->ui();
39 public function getSingleHTML(?array $options =
null,
bool $link =
true): string
41 return $this->
getHTML(
true, $options ?? []);
44 public function getHTML(
bool $link =
true, array $options = []): string
46 $value = $this->record_field->getValue();
48 if ($value ===
null) {
52 if (is_array($value)) {
53 return $value[
'name'] ??
'undefined';
56 $title = $this->valueToFileTitle($value);
59 return $this->
lng->txt(
'file_not_found');
63 $link_component = $this->ui_services->factory()->link()->standard(
68 return $this->ui_services->renderer()->render($link_component);
76 if ($value ===
null || is_array($value)) {
79 return $this->valueToFileTitle($value);
86 $this->
ctrl->setParameterByClass(
87 ilDclRecordListGUI::class,
91 $this->
ctrl->setParameterByClass(
92 ilDclRecordListGUI::class,
96 return $this->
ctrl->getLinkTargetByClass(
97 ilDclRecordListGUI::class,
ilDclBaseRecordFieldModel $record_field
getRecordField()
Get Record Field.
@noinspection AutoloadingIssuesInspection
__construct(ilDclBaseRecordFieldModel $record_field)
getSingleHTML(?array $options=null, bool $link=true)
Returns data for single record view.
ILIAS ResourceStorage Services $irss
parseFormInput($value)
function parses stored value to the variable needed to fill into the form for editing.
ILIAS DI UIServices $ui_services
getHTML(bool $link=true, array $options=[])
Outputs html of a certain field.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc