ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
class.ilMediaPoolPresentationGUI.php
Go to the documentation of this file.
1<?php
2
25{
26 protected \ILIAS\MediaPool\InternalGUIService $gui;
27 protected \ILIAS\MediaPool\StandardGUIRequest $request;
28 protected ilCtrl $ctrl;
32 protected ilLanguage $lng;
34
35 public function __construct()
36 {
37 global $DIC;
38
39 $this->access = $DIC->access();
40 $this->nav_history = $DIC["ilNavigationHistory"];
41 $tpl = $DIC["tpl"];
42 $lng = $DIC->language();
43 $objDefinition = $DIC["objDefinition"];
44 $ilCtrl = $DIC->ctrl();
45
46 $lng->loadLanguageModule("content");
47
48 $this->ctrl = $ilCtrl;
49 // initiate variables
50 $this->tpl = $tpl;
51 $this->lng = $lng;
52 $this->objDefinition = $objDefinition;
53 $this->gui = $DIC->mediaPool()->internal()->gui();
54 $DIC->globalScreen()->tool()->context()->claim()->repository();
55 $DIC->globalScreen()->tool()->context()->current()->addAdditionalData(ilMediaPoolGSToolProvider::SHOW_FOLDERS_TOOL, true);
56
57 $this->request = $DIC->mediaPool()
58 ->internal()
59 ->gui()
60 ->standardRequest();
61 }
62
63 public function executeCommand(): void
64 {
65 $ilCtrl = $this->ctrl;
66 $ilAccess = $this->access;
67 $ilNavigationHistory = $this->nav_history;
68
69 $next_class = $this->ctrl->getNextClass($this);
70
71 // add entry to navigation history
72 if ($ilAccess->checkAccess("read", "", $this->request->getRefId())) {
73 $ilNavigationHistory->addItem(
74 $this->request->getRefId(),
75 "ilias.php?baseClass=ilMediaPoolPresentationGUI&ref_id=" . $this->request->getRefId(),
76 "mep"
77 );
78 }
79
80 switch ($next_class) {
81 case "ilobjmediapoolgui":
82 $this->gui->permanentLink($this->request->getRefId())->setPermanentLink();
83 $mep_gui = new ilObjMediaPoolGUI($this->request->getRefId());
84 $ilCtrl->forwardCommand($mep_gui);
85 break;
86
87 default:
88 $this->ctrl->saveParameterByClass(ilObjMediaPoolGUI::class, "ref_id");
89 $this->ctrl->saveParameterByClass(ilObjMediaPoolGUI::class, "mepitem_id");
90 $this->ctrl->saveParameterByClass(ilObjMediaPoolGUI::class, "force_filter");
91 $this->ctrl->redirectByClass(ilObjMediaPoolGUI::class, $this->ctrl->getCmd());
92 }
93 }
94}
Class ilCtrl provides processing control methods.
language handling
loadLanguageModule(string $a_module)
Load language module.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS MediaPool StandardGUIRequest $request
ILIAS MediaPool InternalGUIService $gui
Last visited history for repository items.
User Interface class for media pool objects.
parses the objects.xml it handles the xml-description of all ilias objects
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:26