ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilMediaCastHandlerGUI.php
Go to the documentation of this file.
1 <?php
2 
20 
27 {
28  protected \ILIAS\MediaCast\InternalGUIService $gui;
29  protected \ILIAS\MediaCast\InternalDomainService $domain;
31  protected ilCtrl $ctrl;
32  protected ilLanguage $lng;
36 
37  public function __construct()
38  {
39  global $DIC;
40 
41  $service = $DIC->mediaCast()->internal();
42 
43  $this->domain = $domain = $service->domain();
44  $this->gui = $gui = $service->gui();
45 
46  $this->lng = $domain->lng();
47  $this->access = $domain->access();
48  $this->tpl = $gui->ui()->mainTemplate();
49  $this->nav_history = $gui->navigationHistory();
50  $this->ctrl = $gui->ctrl();
51 
52  $this->request = $DIC->mediaCast()
53  ->internal()
54  ->gui()
55  ->standardRequest();
56  }
57 
58  public function executeCommand(): void
59  {
60  $ilAccess = $this->access;
61  $tpl = $this->tpl;
62  $ilNavigationHistory = $this->nav_history;
63 
64  $next_class = $this->ctrl->getNextClass($this);
65  if ((string) $next_class === "") {
66  $this->ctrl->setParameterByClass(ilObjMediaCastGUI::class, "ref_id", $this->request->getRefId());
67  $this->ctrl->redirectByClass(ilObjMediaCastGUI::class, "showContent");
68  }
69 
70  // add entry to navigation history
71  if ($ilAccess->checkAccess("read", "", $this->request->getRefId())) {
72  $ilNavigationHistory->addItem(
73  $this->request->getRefId(),
74  "ilias.php?baseClass=ilMediaCastHandlerGUI&cmd=showContent&ref_id=" .
75  $this->request->getRefId(),
76  "mcst"
77  );
78  }
79 
80  switch ($next_class) {
81  case 'ilobjmediacastgui':
82  $mc_gui = $this->gui->getObjMediaCastGUI();
83  $this->ctrl->forwardCommand($mc_gui);
84  break;
85  }
86 
87  $tpl->printToStdout();
88  }
89 }
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
ILIAS MediaCast InternalGUIService $gui
Handles user interface for media casts auth ilMediaCastHandlerGUI: ilObjMediaCastGUI.
ILIAS MediaCast InternalDomainService $domain
Interface ilCtrlBaseClassInterface describes ilCtrl base classes.
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Last visited history for repository items.
ilGlobalTemplateInterface $tpl
$service
Definition: ltiservices.php:43