ILIAS  release_8 Revision v8.24
class.ilRendererTableGUI.php
Go to the documentation of this file.
1<?php
27{
28 public function __construct(ilObjFileAccessSettingsGUI $a_parent_obj, string $a_parent_cmd)
29 {
30 global $DIC;
31
32 parent::__construct($a_parent_obj, $a_parent_cmd);
33
34 // general properties
35 $this->setRowTemplate("tpl.renderer_row.html", "Services/Preview");
36 $this->setLimit(9999);
37 $this->setEnableHeader(true);
38 $this->disable("footer");
39 $this->setExternalSorting(true);
40 $this->setEnableTitle(true);
41 $this->setTitle($this->lng->txt("loaded_preview_renderers"));
42
43 $this->addColumn($this->lng->txt("name"));
44 $this->addColumn($this->lng->txt("type"));
45 $this->addColumn($this->lng->txt("renderer_supported_repo_types"));
46 $this->addColumn($this->lng->txt("renderer_supported_file_types"));
47 }
48
53 protected function fillRow(array $a_set): void
54 {
55 $name = $a_set['name'] ?? '-';
56 $type = $this->lng->txt("renderer_type_" . (($a_set['s_plugin'] ?? false) ? "plugin" : "builtin"));
57
58 $repo_types = [];
59 foreach ($a_set['supported_repo_types'] as $repo_type) {
60 $repo_types[] = $this->lng->txt($repo_type);
61 }
62
63 // supports files?
64 $file_types = "";
65 if (isset($a_set['object']) && $a_set['object'] instanceof ilFilePreviewRenderer) {
66 $file_types = implode(", ", $a_set['supported_file_formats'] ?? []);
67 }
68
69 // fill template
70 $this->tpl->setVariable("TXT_NAME", $name);
71 $this->tpl->setVariable("TXT_TYPE", $type);
72 $this->tpl->setVariable("TXT_REPO_TYPES", implode(", ", $repo_types));
73 $this->tpl->setVariable("TXT_FILE_TYPES", $file_types);
74 }
75}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilObjFileAccessSettingsGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilObjFileAccessSettingsGUI $a_parent_obj, string $a_parent_cmd)
fillRow(array $a_set)
Standard Version of Fill Row.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setLimit(int $a_limit=0, int $a_default_limit=0)
set max.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
setEnableTitle(bool $a_enabletitle)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setEnableHeader(bool $a_enableheader)
setExternalSorting(bool $a_val)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
disable(string $a_module_name)
global $DIC
Definition: feed.php:28
if($format !==null) $name
Definition: metadata.php:247
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$type