ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
EditSkillsOfQuestionTableEditAction.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24use ILIAS\UI\Factory as UIFactory;
27
29{
30 public const string ACTION_ID = 'edit_assignment';
31
32 public function __construct(
33 private readonly UIFactory $ui_factory,
34 private readonly \ilLanguage $lng,
35 private readonly bool $assignment_editing_enabled
36 ) {
37 }
38
39 public function getActionId(): string
40 {
41 return self::ACTION_ID;
42 }
43
44 public function isAvailable(): bool
45 {
46 return true;
47 }
48
49 public function getTableAction(
50 URLBuilder $url_builder,
51 URLBuilderToken $row_id_token,
52 URLBuilderToken $action_token,
53 URLBuilderToken $action_type_token
54 ): Action {
55 return $this->ui_factory->table()->action()->single(
56 $this->lng->txt($this->assignment_editing_enabled ? 'tst_edit_competence_assign' : 'tst_view_competence_assign'),
57 $url_builder
58 ->withParameter($action_token, self::ACTION_ID)
59 ->withParameter($action_type_token, EditSkillsOfQuestionTableActions::SHOW_ACTION),
60 $row_id_token
61 );
62 }
63
64 public function allowActionForRecord(\ilAssQuestionSkillAssignment $record): bool
65 {
66 return true;
67 }
68}
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
getTableAction(URLBuilder $url_builder, URLBuilderToken $row_id_token, URLBuilderToken $action_token, URLBuilderToken $action_type_token)
__construct(private readonly UIFactory $ui_factory, private readonly \ilLanguage $lng, private readonly bool $assignment_editing_enabled)
language handling
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $lng
Definition: privfeed.php:31