24 public function getHTML(
bool $link =
true, array $options = []): string
29 $has_ilfilehash = $this->
http->wrapper()->post()->has(
'ilfilehash');
30 if (is_array($value) && $has_ilfilehash) {
31 $ilfilehash = $this->
http->wrapper()->post()->retrieve(
'ilfilehash', $this->
refinery->kindlyTo()->string());
32 $this->
ctrl->setParameterByClass(
"ildclrecordlistgui",
"ilfilehash", $ilfilehash);
33 $this->
ctrl->setParameterByClass(
39 return '<a href="' . $this->
ctrl->getLinkTargetByClass(
42 ) .
'">' . $value[
'name'] .
'</a>';
50 $this->
ctrl->setParameterByClass(
55 $this->
ctrl->setParameterByClass(
61 $html =
'<a href="' . $this->
ctrl->getLinkTargetByClass(
64 ) .
'">' . $file_obj->getFileName() .
'</a>';
68 $ref_id = $this->
http->wrapper()->query()->retrieve(
'ref_id', $this->
refinery->kindlyTo()->int());
77 $preview_status_class =
"";
78 $preview_text_topic =
"preview_show";
80 $preview_status_class =
"ilPreviewStatusNone";
81 $preview_text_topic =
"preview_none";
83 $wrapper_html_id =
'record_field_' . $this->
getRecordField()->getId();
84 $script_preview_click =
$preview->getJSCall($wrapper_html_id);
85 $preview_title = $this->
lng->txt($preview_text_topic);
87 $html =
'<div id="' . $wrapper_html_id .
'">' . $html;
88 $html .=
'<span class="il_ContainerItemPreview ' . $preview_status_class .
'"><a href="javascript:void(0);" onclick="' 89 . $script_preview_click .
'" title="' . $preview_title .
'"><img src="' . $preview_icon
90 .
'" height="16" width="16"></a></span></div>';
103 if (is_array($value)) {
111 $file_obj =
new ilObjFile($value,
false);
114 return $file_obj->getFileName();
getRecord()
Getter shortcut for record.
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
getField()
Getter shortcut for field.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static createPreview(\ilObject $a_obj, bool $a_force=false)
Creates the preview for the object with the specified id.
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.
static lookupRenderStatus(int $a_obj_id)
Gets the render status for the object with the specified id.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getHTML(bool $link=true, array $options=[])
Outputs html of a certain field.
getRecordField()
Get Record Field.
static hasPreview(int $a_obj_id, string $a_type="")
Determines whether the object with the specified reference id has a preview.
parseFormInput($value)
function parses stored value to the variable needed to fill into the form for editing.
static _lookupType(int $id, bool $reference=false)