ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
GridCellTableBuilder.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 ilPCGrid;
15
20{
21 public function __construct(
22 protected InternalDomainService $domain,
23 protected InternalGUIService $gui,
24 protected ilPCGrid $grid,
25 object $parent_gui,
26 string $parent_cmd
27 ) {
28 parent::__construct($parent_gui, $parent_cmd, false);
29 }
30
31 protected function getId(): string
32 {
33 return "pcgrid";
34 }
35
36 protected function getTitle(): string
37 {
38 return $this->domain->lng()->txt("cont_ed_grid_col_widths");
39 }
40
41 protected function getRetrieval(): RetrievalInterface
42 {
43 return $this->domain->pc()->gridCellRetrieval($this->grid);
44 }
45
46 protected function transformRow(array $data_row): array
47 {
48 return $data_row;
49 }
50
51 protected function getOrderingCommand(): string
52 {
53 return "savePositions";
54 }
55
57 {
58 $lng = $this->domain->lng();
60 ->textColumn("s", $lng->txt("cont_grid_width_s"), false)
61 ->textColumn("m", $lng->txt("cont_grid_width_m"), false)
62 ->textColumn("l", $lng->txt("cont_grid_width_l"), false)
63 ->textColumn("xl", $lng->txt("cont_grid_width_xl"), false)
64 ->multiAction("confirmCellDeletion", $lng->txt("delete"), true)
65 ->singleAction("editWidths", $lng->txt("edit"), true);
66
67 return $table;
68 }
69}
transformRow(array $data_row)
transform raw data array to table row data array
__construct(protected InternalDomainService $domain, protected InternalGUIService $gui, protected ilPCGrid $grid, object $parent_gui, string $parent_cmd)
textColumn(string $key, string $title, bool $sortable=false)
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