ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
class.ilAssQuestionSkillUsagesGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24use ILIAS\UI\Factory as UIFactory;
25use ILIAS\UI\Renderer as UIRenderer;
26
28{
29 public const string CMD_SHOW = 'show';
30
31 public function __construct(
32 private readonly UIFactory $ui_factory,
33 private readonly UIRenderer $ui_renderer,
34 private readonly GlobalHttpState $http_state,
35 private readonly \ilLanguage $lng,
36 private readonly \ilGlobalTemplateInterface $tpl,
37 private readonly \ilDBInterface $db,
38 private readonly int $parent_obj_id
39 ) {
40 }
41
42 public function executeCommand(): bool
43 {
44 return $this->showCmd();
45 }
46
47 public function showCmd(): bool
48 {
49 $this->tpl->setContent($this->getTable());
50 return true;
51 }
52
53 private function getTable(): string
54 {
55 $assignment_list = new \ilAssQuestionSkillAssignmentList($this->db);
56 $assignment_list->setParentObjId($this->parent_obj_id);
57 $assignment_list->loadFromDb();
58 $assignment_list->loadAdditionalSkillData();
59
60 $table = new SkillUsagesTable($this->ui_factory, $this->lng, $assignment_list);
61
62 return $this->ui_renderer->render($table->getComponent()->withRequest($this->http_state->request()));
63 }
64}
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
__construct(private readonly UIFactory $ui_factory, private readonly UIRenderer $ui_renderer, private readonly GlobalHttpState $http_state, private readonly \ilLanguage $lng, private readonly \ilGlobalTemplateInterface $tpl, private readonly \ilDBInterface $db, private readonly int $parent_obj_id)
language handling
Interface GlobalHttpState.
An entity that renders components to a string output.
Definition: Renderer.php:31
Interface ilDBInterface.
global $lng
Definition: privfeed.php:31