19 declare(strict_types=1);
26 public function getHTML(
bool $link =
true, array $options = []): string
30 if (is_null($value)) {
35 $has_ilfilehash = $this->
http->wrapper()->post()->has(
'ilfilehash');
36 if (is_array($value) && $has_ilfilehash) {
37 $ilfilehash = $this->
http->wrapper()->post()->retrieve(
'ilfilehash', $this->
refinery->kindlyTo()->string());
39 $this->
ctrl->setParameterByClass(ilDclRecordListGUI::class,
"ilfilehash", $ilfilehash);
40 $this->
ctrl->setParameterByClass(
41 ilDclRecordListGUI::class,
46 return '<a href="' . $this->
ctrl->getLinkTargetByClass(
47 ilDclRecordListGUI::class,
49 ) .
'">' . $value[
'name'] .
'</a>';
53 $med = $mob->getMediaItem(
'Standard');
55 if (!$med || $med->getLocation() ===
"") {
63 if ($this->
http->wrapper()->query()->has(
"tableview_id")) {
64 $tableview_id = $this->
http->wrapper()->query()->retrieve(
69 $has_view = $page->getPageObject()->isActive();
74 if (in_array($med->getSuffix(), [
'jpg',
'jpeg',
'png',
'gif'])) {
80 if ($is_linked_field && $has_view && $link) {
81 $this->
ctrl->setParameterByClass(
82 'ilDclDetailedViewGUI',
86 $image = $image->withAction($this->
ctrl->getLinkTargetByClass(
"ilDclDetailedViewGUI",
'renderRecord'));
91 if ($med->getSuffix() ==
'mp3') {
97 if ($is_linked_field && $has_view) {
98 $this->
ctrl->setParameterByClass(
99 'ilDclDetailedViewGUI',
104 $this->
lng->txt(
'details'),
105 $this->
ctrl->getLinkTargetByClass(
106 "ilDclDetailedViewGUI",
122 return "<div style='width:$width; height:$height;'>$content</div>";
127 if (is_array($value)) {
getRecord()
Getter shortcut for record.
getField()
Getter shortcut for field.
ilDclDetailedViewDefinitionGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMediaPoolTargetSelector ilDcl...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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.
AutoloadingIssuesInspection
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)
static _lookupType(int $id, bool $reference=false)