ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
TeamLogTableBuilder.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Exercise\Team;
22
28
30{
31 public function __construct(
32 protected InternalDomainService $domain,
33 protected InternalGUIService $gui,
34 protected \ilExAssignmentTeam $team,
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 'exercise_team_log';
44 }
45
46 protected function getTitle(): string
47 {
48 return $this->domain->lng()->txt('exc_team_log');
49 }
50
51 protected function getRetrieval(): RetrievalInterface
52 {
53 return $this->domain->teamLogRetrieval($this->team);
54 }
55
56 protected function transformRow(array $data_row): array
57 {
58 return [
59 'id' => $data_row['id'],
60 'tstamp' => (new \DateTimeImmutable('@' . $data_row['tstamp']))
61 ->setTimezone(new \DateTimeZone($this->domain->user()->getTimeZone())),
62 'user' => $data_row['user'],
63 'details' => htmlspecialchars($data_row['details'])
64 ];
65 }
66
68 {
69 $lng = $this->domain->lng();
70
71 return $table
72 ->dateColumn('tstamp', $lng->txt('date'), true)
73 ->textColumn('user', $lng->txt('user'), true)
74 ->textColumn('details', $lng->txt('details'));
75 }
76}
Exercise UI frontend presentation service class.
transformRow(array $data_row)
transform raw data array to table row data array
__construct(protected InternalDomainService $domain, protected InternalGUIService $gui, protected \ilExAssignmentTeam $team, object $parent_gui, string $parent_cmd)
dateColumn(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