ILIAS  release_8 Revision v8.24
class.ilObjTalkTemplateAdministrationGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
33{
34 public function __construct()
35 {
39 $container = $GLOBALS['DIC'];
40 $language = $container->language();
42 ->http()
43 ->wrapper()
44 ->query()
45 ->retrieve("ref_id", $container->refinery()->kindlyTo()->int());
46 parent::__construct([], $refId, true, false);
47
48 $this->type = 'tala';
49
50 $language->loadLanguageModule("tala");
51 }
52
53 protected function supportsPageEditor(): bool
54 {
55 return false;
56 }
57
58 public function isActiveAdministrationPanel(): bool
59 {
60 return false;
61 }
62
63 public function setContentSubTabs(): void
64 {
65 }
66
67 public function executeCommand(): void
68 {
69 $cmd = $this->ctrl->getCmd();
70 $next_class = $this->ctrl->getNextClass($this);
71
72
73 switch ($next_class) {
74 case 'ilpermissiongui':
75 parent::prepareOutput();
76 $this->tabs_gui->activateTab('perm_settings');
77 $ilPermissionGUI = new ilPermissionGUI($this);
78 $this->ctrl->forwardCommand($ilPermissionGUI);
79 break;
80 case 'ilinfoscreengui':
81 parent::prepareOutput();
82 $this->tabs_gui->activateTab('info_short');
83 $ilInfoScreenGUI = new ilInfoScreenGUI($this);
84 $this->ctrl->forwardCommand($ilInfoScreenGUI);
85 break;
86 case strtolower(ilObjTalkTemplateGUI::class):
87 $ilTalkTemplateGUI = new ilObjTalkTemplateGUI();
88 $ilTalkTemplateGUI->setAdminMode($this->admin_mode);
89 $this->ctrl->setParameter(
90 $this,
91 'ref_id',
93 );
94 $this->tabs->setBackTarget(
95 $this->lng->txt('obj_tala'),
96 $this->ctrl->getLinkTarget($this, 'view')
97 );
98 $this->ctrl->clearParameters($this);
99 $this->ctrl->forwardCommand($ilTalkTemplateGUI);
100 break;
101 default:
102 parent::executeCommand();
103 }
104 }
105
109 protected function setTitleAndDescription(): void
110 {
111 # all possible create permissions
112 parent::setTitleAndDescription();
113 $this->tpl->setTitle($this->lng->txt("objs_tala"));
114 $this->tpl->setDescription($this->lng->txt("objs_tala"));
115
116 $this->tpl->setTitleIcon("", $this->lng->txt("obj_" . $this->object->getType()));
117 }
118
119 protected function showPossibleSubObjects(): void
120 {
121 $gui = new ilObjectAddNewItemGUI($this->object->getRefId());
123 $gui->setCreationUrl($this->ctrl->getLinkTargetByClass(strtolower(ilObjTalkTemplateGUI::class), 'create'));
124 $gui->setDisabledObjectTypes([ilObjEmployeeTalkSeries::TYPE]);
125 $gui->render();
126 }
127
128 public function viewObject(): void
129 {
130 $this->tabs_gui->activateTab('view_content');
131
132 if (!$this->rbacsystem->checkAccess("read", $this->getRefId())) {
133 if ($this->rbacsystem->checkAccess("visible", $this->getRefId())) {
134 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("msg_no_perm_read"));
135 $this->ctrl->redirectByClass(strtolower(ilInfoScreenGUI::class), '');
136 }
137
138 $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->WARNING);
139 }
140
141 parent::renderObject();
142 }
143
150 {
152 }
153
154 protected function getTabs(): void
155 {
156 $read_access_ref_id = $this->rbacsystem->checkAccess('visible,read', $this->object->getRefId());
157 if ($read_access_ref_id) {
158 $this->tabs_gui->addTab('view_content', $this->lng->txt("content"), $this->ctrl->getLinkTarget($this, "view"));
159 $this->tabs_gui->addTab("info_short", "Info", $this->ctrl->getLinkTargetByClass(strtolower(ilInfoScreenGUI::class), "showSummary"));
160 }
161 if ($this->tree->getSavedNodeData($this->object->getRefId())) {
162 $this->tabs_gui->addTarget('trash', $this->ctrl->getLinkTarget($this, 'trash'), 'trash', get_class($this));
163 }
164 parent::getTabs();
165 }
166
170 public function getAdminTabs(): void
171 {
172 $this->getTabs();
173 }
174}
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Parent class of all container content GUIs.
Class ilContainerGUI This is a base GUI class for all container objects in ILIAS: root folder,...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilInfoScreenGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getContentGUI()
Filter the view by talk templates because the talk series objects are also children of the talk templ...
showPossibleSubObjects()
show possible sub objects (pull down menu)
getTabs()
@abstract overwrite in derived GUI class of your object type
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions"
Class ilObjTalkTemplateGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
header include for all ilias files.
$container
@noRector
Definition: wac.php:14
$refId
Definition: xapitoken.php:58