24 public function getHTML(
bool $link =
true, array $options = []): string
28 if (is_null($value)) {
33 $has_ilfilehash = $this->
http->wrapper()->post()->has(
'ilfilehash');
34 if (is_array($value) && $has_ilfilehash) {
35 $ilfilehash = $this->
http->wrapper()->post()->retrieve(
'ilfilehash', $this->
refinery->kindlyTo()->string());
37 $this->
ctrl->setParameterByClass(
"ildclrecordlistgui",
"ilfilehash", $ilfilehash);
38 $this->
ctrl->setParameterByClass(
44 return '<a href="' . $this->
ctrl->getLinkTargetByClass(
47 ) .
'">' . $value[
'name'] .
'</a>';
51 $med = $mob->getMediaItem(
'Standard');
53 if (!$med || $med->getLocation() ===
"") {
61 if ($this->
http->wrapper()->query()->has(
"tableview_id")) {
62 $tableview_id = $this->
http->wrapper()->query()->retrieve(
71 if (in_array($med->getSuffix(), [
'jpg',
'jpeg',
'png',
'gif'])) {
77 if ($is_linked_field && $has_view && $link) {
78 $this->
ctrl->setParameterByClass(
79 'ilDclDetailedViewGUI',
83 $image = $image->withAction($this->
ctrl->getLinkTargetByClass(
"ilDclDetailedViewGUI",
'renderRecord'));
85 $components[] = $image;
88 if (in_array($med->getSuffix(), [
'mp3'])) {
89 $components[] = $this->factory->player()->audio(
$location);
91 $components[] = $this->factory->player()->video(
$location);
94 if ($is_linked_field && $has_view) {
95 $this->
ctrl->setParameterByClass(
96 'ilDclDetailedViewGUI',
100 $components[] = $this->factory->link()->standard(
101 $this->
lng->txt(
'details'),
102 $this->
ctrl->getLinkTargetByClass(
103 "ilDclDetailedViewGUI",
118 $content = $this->renderer->render($components);
119 $fixed_size_div =
"<div style='width:$width; height:$height;'>$content</div>";
120 return $fixed_size_div;
130 if (is_null($value)) {
133 if (is_array($value)) {
getRecord()
Getter shortcut for record.
$location
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getField()
Getter shortcut for field.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
static http()
Fetches the global http state from ILIAS.
getHTML(bool $link=true, array $options=[])
Outputs html of a certain field.
const PROP_LINK_DETAIL_PAGE_MOB
getRecordField()
Get Record Field.
static signFile(string $path_to_file)
parseFormInput($value)
function parses stored value to the variable needed to fill into the form for editing.
static _lookupType(int $id, bool $reference=false)