ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilCourseInfoFileTableGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=0);
26{
27 public function __construct(object $a_parent_obj, string $a_parent_cmd = '')
28 {
29 parent::__construct($a_parent_obj, $a_parent_cmd);
30 $this->addColumn('', 'f', '1');
31 $this->addColumn($this->lng->txt('filename'), 'filename', "60%");
32 $this->addColumn($this->lng->txt('filesize'), 'filesize', "20%");
33 $this->addColumn($this->lng->txt('filetype'), 'filetype', "20%");
34
35 $this->setFormAction($this->ctrl->getFormAction($a_parent_obj));
36 $this->setRowTemplate("tpl.crs_info_file_row.html", "components/ILIAS/Course");
37 $this->setDefaultOrderField("filename");
38 $this->setDefaultOrderDirection("desc");
39 }
40
41 public function numericOrdering(string $a_field): bool
42 {
43 switch ($a_field) {
44 case 'filesize':
45 return true;
46 }
47 return parent::numericOrdering($a_field);
48 }
49
50 protected function fillRow(array $a_set): void
51 {
52 $this->tpl->setVariable('VAL_ID', $a_set['id']);
53 $this->tpl->setVariable('VAL_FILENAME', $a_set['filename']);
54 $this->tpl->setVariable('VAL_FILETYPE', $a_set['filetype']);
55 $this->tpl->setVariable('VAL_FILESIZE', $a_set['filesize']);
56 }
57}
__construct(object $a_parent_obj, string $a_parent_cmd='')
numericOrdering(string $a_field)
Should this field be sorted numeric?
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...
setFormAction(string $a_form_action, bool $a_multipart=false)
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)
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc