ILIAS  release_8 Revision v8.24
class.ilOrgUnitDefaultPermissionGUI.php
Go to the documentation of this file.
1<?php
20
27{
28 private \ilGlobalTemplateInterface $main_tpl;
29 private \ilObjectDefinition $objectDefintion;
30 private \ILIAS\HTTP\Services $http;
31 private \ilCtrlInterface $ctrl;
32 private \ilLanguage $lng;
33
34 public function __construct()
35 {
36 global $DIC;
37
39
40 $this->main_tpl = $DIC->ui()->mainTemplate();
41 $this->objectDefintion = $DIC["objDefinition"];
42 $this->http = $DIC->http();
43 $this->ctrl = $DIC->ctrl();
44 $this->lng = $DIC->language();
45 }
46
47 protected function index(): void
48 {
49 $this->getParentGui()->addSubTabs();
52 $ilOrgUnitDefaultPermissionFormGUI = new ilOrgUnitDefaultPermissionFormGUI(
53 $this,
54 $ilOrgUnitPermissions,
55 $this->objectDefintion
56 );
57 $ilOrgUnitDefaultPermissionFormGUI->fillForm();
58
59 $this->setContent($ilOrgUnitDefaultPermissionFormGUI->getHTML());
60 }
61
62 protected function update(): void
63 {
64 $this->getParentGui()->addSubTabs();
66 $ilOrgUnitDefaultPermissionFormGUI = new ilOrgUnitDefaultPermissionFormGUI(
67 $this,
68 $ilOrgUnitPermissions,
69 $this->objectDefintion
70 );
71 if ($ilOrgUnitDefaultPermissionFormGUI->saveObject()) {
72 $this->main_tpl->setOnScreenMessage('success', $this->lng->txt('msg_success_permission_saved'), true);
73 $this->cancel();
74 }
75
76 $this->setContent($ilOrgUnitDefaultPermissionFormGUI->getHTML());
77 }
78
79 protected function getCurrentPositionId(): int
80 {
81 static $id;
82 if (!$id) {
83 $id = $this->http->request()->getQueryParams()['arid'];
84 }
85
86 return (int) $id;
87 }
88
89 protected function cancel(): void
90 {
91 $this->ctrl->redirectByClass(ilOrgUnitPositionGUI::class);
92 }
93}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
Class ilOrgUnitDefaultPermissionGUI.
static getAllTemplateSetsForAllActivedContexts(int $position_id, bool $editable=false)
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc