ILIAS  trunk Revision v11.0_alpha-1838-g59fc79e306b
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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  //exit;
68  $this->ctrl->redirectByClass(ilObjMediaCastGUI::class, "showContent");
69  }
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=ilMediaCastHandlerGUI&cmd=showContent&ref_id=" .
76  $this->request->getRefId(),
77  "mcst"
78  );
79  }
80 
81  switch ($next_class) {
82  case 'ilobjmediacastgui':
83  $mc_gui = $this->gui->getObjMediaCastGUI();
84  $this->ctrl->forwardCommand($mc_gui);
85  break;
86  }
87 
88  $tpl->printToStdout();
89  }
90 }
ILIAS MediaCast InternalGUIService $gui
Handles user interface for media casts auth ilMediaCastHandlerGUI: ilObjMediaCastGUI.
ILIAS MediaCast InternalDomainService $domain
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:22
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
Last visited history for repository items.
ilGlobalTemplateInterface $tpl
$service
Definition: ltiservices.php:40