ILIAS  release_8 Revision v8.24
class.ilTestExportTableGUI.php
Go to the documentation of this file.
1<?php
2
27{
28 public function __construct($a_parent_obj, $a_parent_cmd, $a_exp_obj)
29 {
30 parent::__construct($a_parent_obj, $a_parent_cmd, $a_exp_obj);
31
32 // NOT REQUIRED ANYMORE, PROBLEM NOW FIXED IN THE ROOT
33 // KEEP CODE, JF OPINIONS / ROOT FIXINGS CAN CHANGE
34 //$this->addCustomColumn($this->lng->txt('actions'), $this, 'formatActionsList');
35 }
36
37 protected function formatActionsList(string $type, string $filename): string
38 {
42 global $DIC;
43 $ilCtrl = $DIC['ilCtrl'];
44
45 $list = new ilAdvancedSelectionListGUI();
46 $list->setListTitle($this->lng->txt('actions'));
47 $ilCtrl->setParameter($this->getParentObject(), 'file', $filename);
48 $list->addItem($this->lng->txt('download'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'download'));
49 $ilCtrl->setParameter($this->getParentObject(), 'file', '');
50 return $list->getHTML();
51 }
52
53 protected function initMultiCommands(): void
54 {
55 $this->addMultiCommand('confirmDeletion', $this->lng->txt('delete'));
56 }
57
61 public function getExportFiles(): array
62 {
63 return array();
64 }
65
66 protected function initColumns(): void
67 {
68 $this->addColumn($this->lng->txt(''), '', '1', true);
69 $this->addColumn($this->lng->txt('type'), 'type');
70 $this->addColumn($this->lng->txt('file'), 'file');
71 $this->addColumn($this->lng->txt('size'), 'size');
72 $this->addColumn($this->lng->txt('date'), 'timestamp');
73 }
74
75 public function numericOrdering(string $a_field): bool
76 {
77 if (in_array($a_field, array('size', 'date'))) {
78 return true;
79 }
80
81 return false;
82 }
83
84 protected function getRowId(array $row): string
85 {
86 return $row['file'];
87 }
88
89 public function resetFormats(): void
90 {
91 $this->formats = [];
92 }
93
94 public function addFormat(string $format)
95 {
96 $this->formats[$format] = $format;
97 }
98}
$filename
Definition: buildRTE.php:78
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...
addMultiCommand(string $a_cmd, string $a_text)
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
numericOrdering(string $a_field)
Should this field be sorted numeric?
__construct($a_parent_obj, $a_parent_cmd, $a_exp_obj)
getExportFiles()
Overwrite method because data is passed from outside.
global $DIC
Definition: feed.php:28
$format
Definition: metadata.php:235
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$type