ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
CriteriaTableBuilder.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
28
30{
31 public function __construct(
32 protected InternalDomainService $domain,
33 protected InternalGUIService $gui,
34 protected int $cat_id,
35 object $parent_gui,
36 string $parent_cmd
37 ) {
38 parent::__construct($parent_gui, $parent_cmd);
39 }
40
41 protected function getId(): string
42 {
43 return 'exc_criteria_' . $this->cat_id;
44 }
45
46 protected function getTitle(): string
47 {
48 return $this->domain->lng()->txt('exc_criterias');
49 }
50
51 protected function getRetrieval(): RetrievalInterface
52 {
53 return $this->domain->peerReview()->criteriaRetrieval($this->cat_id);
54 }
55
56 protected function getOrderingCommand(): string
57 {
58 return 'saveOrder';
59 }
60
61 protected function transformRow(array $data_row): array
62 {
63 return [
64 'id' => $data_row['id'],
65 'title' => $data_row['title'],
66 'type' => $data_row['type']
67 ];
68 }
69
71 {
72 $lng = $this->domain->lng();
73
74 return $table
75 ->textColumn('title', $lng->txt('title'))
76 ->textColumn('type', $lng->txt('type'))
77 ->singleRedirectAction(
78 'edit',
79 $lng->txt('edit'),
80 [\ilExcCriteriaGUI::class],
81 'edit',
82 'crit_id'
83 )
84 ->multiAction('confirmDeletion', $lng->txt('delete'));
85 }
86}
Exercise UI frontend presentation service class.
__construct(protected InternalDomainService $domain, protected InternalGUIService $gui, protected int $cat_id, object $parent_gui, string $parent_cmd)
transformRow(array $data_row)
transform raw data array to table row data array
textColumn(string $key, string $title, bool $sortable=false)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $lng
Definition: privfeed.php:26