ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjectActivationGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
29{
31 protected ilCtrl $ctrl;
32 protected ilLanguage $lng;
34 protected ilHelpGUI $help;
37
38 protected int $parent_ref_id;
39 protected int $item_id;
40
41 protected ?int $timing_mode = null;
43
44 public function __construct(int $ref_id, int $item_id)
45 {
46 global $DIC;
47
48 $this->tpl = $DIC->ui()->mainTemplate();
49 $this->ctrl = $DIC->ctrl();
50 $this->lng = $DIC->language();
51 $this->lng->loadLanguageModule('crs');
52 $this->tabs_gui = $DIC->tabs();
53 $this->help = $DIC["ilHelp"];
54 $this->request_wrapper = $DIC->http()->wrapper()->query();
55 $this->refinery = $DIC->refinery();
56
57 $this->parent_ref_id = $ref_id;
58 $this->item_id = $item_id;
59
60 $this->ctrl->saveParameter($this, 'item_id');
61 }
62
63 public function executeCommand(): void
64 {
65 $this->setTabs();
66
67 $this->tpl->loadStandardTemplate();
68
69 $this->ctrl->forwardCommand(
70 new ilConditionHandlerGUI($this->item_id)
71 );
72 $this->tpl->printToStdout();
73 }
74
75 protected function setTabs(): bool
76 {
77 $this->tabs_gui->clearTargets();
78
79 $this->help->setScreenIdComponent("obj");
80
81 $this->ctrl->setParameterByClass("ilrepositorygui", "ref_id", $this->parent_ref_id);
82 $back_link = $this->ctrl->getLinkTargetByClass("ilrepositorygui", "");
83 $ref_id = $this->request_wrapper->retrieve("ref_id", $this->refinery->kindlyTo()->string());
84 $this->ctrl->setParameterByClass("ilrepositorygui", "ref_id", $ref_id);
85 $this->tabs_gui->setBackTarget($this->lng->txt('btn_back'), $back_link);
86
87 $this->ctrl->setParameterByClass('ilconditionhandlergui', 'item_id', $this->item_id);
88 $this->tabs_gui->addTarget(
89 "preconditions",
90 $this->ctrl->getLinkTargetByClass('ilConditionHandlerGUI', 'listConditions'),
91 "",
92 "ilConditionHandlerGUI"
93 );
94 return true;
95 }
96}
Builds data types.
Definition: Factory.php:36
class ilConditionHandlerGUI
Class ilCtrl provides processing control methods.
Help GUI class.
language handling
Class ilObjectActivationGUI.
ilGlobalTemplateInterface $tpl
__construct(int $ref_id, int $item_id)
ILIAS HTTP Wrapper RequestWrapper $request_wrapper
ILIAS Refinery Factory $refinery
Class ilObjectActivation.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface RequestWrapper.
$ref_id
Definition: ltiauth.php:66
global $DIC
Definition: shib_login.php:26