ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjLegalNoticeGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
26{
28
29 public function __construct(int $a_id = 0, int $a_id_type = self::REPOSITORY_NODE_ID, int $a_parent_node_id = 0)
30 {
31 $this->legal_notice_gui = new ilImprintGUI();
32 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
33 $this->legal_notice_gui->setPresentationTitle($this->lng->txt('adm_imprint'));
34 }
35
36 public function getType(): string
37 {
38 return 'impr';
39 }
40
41 public function executeCommand(): void
42 {
43 $this->prepareOutput();
44
45 $nextClass = $this->ctrl->getNextClass($this);
46 $cmd = $this->ctrl->getCmd();
47
48 switch (strtolower($nextClass)) {
49 case strtolower(ilPermissionGUI::class):
50 $perm_gui = new ilPermissionGUI($this);
51 $this->ctrl->forwardCommand($perm_gui);
52 break;
53
54 case (strtolower(ilImprintGUI::class)):
55 if (!$this->checkPermissionBool('write')) {
56 $this->legal_notice_gui->setEnableEditing(false);
57 }
58 $ret = $this->ctrl->forwardCommand($this->legal_notice_gui);
59
60 $this->tpl->setContent($ret);
61 break;
62
63 default:
64 $cmd .= 'Cmd';
65 if (method_exists($this, $cmd)) {
66 $this->tpl->setContent($this->$cmd());
67 }
68 break;
69 }
70 }
71
72 private function viewCmd(): never
73 {
74 $this->ctrl->redirect($this->legal_notice_gui, 'preview');
75 }
76}
@ilCtrl_Calls ilImprintGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMediaPoolTargetSelector @ilCtrl_Ca...
@ilCtrl_Calls ilObjLegalNoticeGUI: ilPermissionGUI, ilImprintGUI @ilCtrl_isCalledBy ilObjLegalNoticeG...
__construct(int $a_id=0, int $a_id_type=self::REPOSITORY_NODE_ID, int $a_parent_node_id=0)
getType()
Functions that must be overwritten.
New implementation of ilObjectGUI.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
prepareOutput(bool $show_sub_objects=true)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc