ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
TeamMembersTableBuilder.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 protected int $parent_ref_id,
36 protected bool $read_only,
37 object $parent_gui,
38 string $parent_cmd
39 ) {
40 parent::__construct($parent_gui, $parent_cmd);
41 }
42
43 protected function getId(): string
44 {
45 return 'exercise_team_members';
46 }
47
48 protected function getTitle(): string
49 {
50 return $this->domain->lng()->txt('exc_team_members');
51 }
52
53 protected function getRetrieval(): RetrievalInterface
54 {
55 $edit_permission = $this->domain->access()->checkAccessOfUser(
56 $this->domain->user()->getId(),
57 'edit',
58 '',
59 $this->parent_ref_id
60 );
61
62 return $this->domain->teamMembersRetrieval(
63 $this->team,
64 $this->parent_ref_id,
65 $edit_permission
66 );
67 }
68
69 protected function transformRow(array $data_row): array
70 {
71 $name = $data_row['name'];
72 if ($data_row['access_warning'] !== '') {
73 $name .= '<br>' . htmlspecialchars($data_row['access_warning']);
74 }
75
76 return [
77 'id' => $data_row['id'],
78 'name' => $name
79 ];
80 }
81
83 {
85 'name',
86 $this->domain->lng()->txt('name'),
87 true
88 );
89
90 if (!$this->read_only) {
92 'confirmRemoveTeamMember',
93 $this->domain->lng()->txt('remove')
94 );
95 }
96
97 return $table;
98 }
99}
Exercise UI frontend presentation service class.
__construct(protected InternalDomainService $domain, protected InternalGUIService $gui, protected \ilExAssignmentTeam $team, protected int $parent_ref_id, protected bool $read_only, 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)
singleAction(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...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc