ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
FileListTableBuilder.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2024 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5declare(strict_types=1);
6
8
14use ilPCFileList;
15use ilObjFile;
17
22{
23 protected int $pos = 0;
24
25 public function __construct(
26 protected InternalDomainService $domain,
27 protected InternalGUIService $gui,
28 protected ilPCFileList $file_list,
29 object $parent_gui,
30 string $parent_cmd
31 ) {
32 parent::__construct($parent_gui, $parent_cmd, false);
33 }
34
35 protected function getId(): string
36 {
37 return "pcfl";
38 }
39
40 protected function getTitle(): string
41 {
42 return $this->domain->lng()->txt("cont_files");
43 }
44
45 protected function getRetrieval(): RetrievalInterface
46 {
47 return $this->domain->pc()->fileListRetrieval($this->file_list);
48 }
49
50 protected function transformRow(array $data_row): array
51 {
52 return $data_row;
53 }
54
55 protected function getOrderingCommand(): string
56 {
57 return "savePositions";
58 }
59
60
62 {
63 $lng = $this->domain->lng();
64 $lng->loadLanguageModule("style");
65 $lng->loadLanguageModule("copg");
67 ->textColumn("file_name", $lng->txt("cont_file"), false);
68
69 if ($this->parent_gui->checkStyleSelection()) {
70 $table = $table->textColumn("class", $lng->txt("sty_class"), false);
71 }
72
74 ->multiAction("confirmDeletionFileItem", $lng->txt("delete"), true);
75
76 if ($this->parent_gui->checkStyleSelection()) {
77 $table = $table->singleAction("editStyleClass", $lng->txt("copg_edit_style_class"), true);
78 } else {
79 //$table = $table->standardAction("savePositions", $lng->txt("cont_save_positions"));
80 }
81
82 return $table;
83 }
84}
transformRow(array $data_row)
transform raw data array to table row data array
__construct(protected InternalDomainService $domain, protected InternalGUIService $gui, protected ilPCFileList $file_list, object $parent_gui, string $parent_cmd)
textColumn(string $key, string $title, bool $sortable=false)
singleAction(string $action, string $title, bool $async=false)
multiAction(string $action, string $title, bool $async=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilObjFile.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $lng
Definition: privfeed.php:26