ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilTestPassDeletionConfirmationGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
28{
29 public const CONTEXT_PASS_OVERVIEW = 'contPassOverview';
30 public const CONTEXT_INFO_SCREEN = 'contInfoScreen';
31
32 protected ilCtrl $ctrl;
33
34 public function __construct(ilCtrlInterface $ctrl, ilLanguage $lng, object $parentGUI)
35 {
36 $this->ctrl = $ctrl;
37 $this->lng = $lng;
38
39 $this->setFormAction($this->ctrl->getFormAction($parentGUI));
40
42 }
43
44 public function build(int $activeId, int $pass, string $context): void
45 {
46 $this->addHiddenItem('active_id', (string) $activeId);
47 $this->addHiddenItem('pass', (string) $pass);
48
49 switch ($context) {
52
53 $this->addHiddenItem('context', $context);
54 break;
55
56 default: throw new ilTestException('invalid context given!');
57 }
58
59 $this->setCancel($this->lng->txt('cancel'), 'cancelDeletePass');
60 $this->setConfirm($this->lng->txt('delete'), 'performDeletePass');
61 $this->setHeaderText($this->lng->txt('conf_delete_pass'));
62 }
63}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setFormAction(string $a_form_action)
setCancel(string $a_txt, string $a_cmd, string $a_id='')
setHeaderText(string $a_headertext)
setConfirm(string $a_txt, string $a_cmd, string $a_id='')
addHiddenItem(string $a_post_var, string $a_value)
Class ilCtrl provides processing control methods.
language handling
Base Exception for all Exceptions relating to Modules/Test.
__construct(ilCtrlInterface $ctrl, ilLanguage $lng, object $parentGUI)
build(int $activeId, int $pass, string $context)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$context
Definition: webdav.php:31