ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilMembershipOverviewGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
28 {
30  protected ilLanguage $lng;
32 
33  public function __construct()
34  {
35  global $DIC;
36 
37  $this->ctrl = $DIC->ctrl();
38  $this->lng = $DIC->language();
39  $this->main_tpl = $DIC->ui()->mainTemplate();
40  }
41 
42  public function executeCommand(): void
43  {
44  $ctrl = $this->ctrl;
45  $next_class = $ctrl->getNextClass($this);
46  $cmd = $ctrl->getCmd("show");
47  $this->main_tpl->setTitle($this->lng->txt("my_courses_groups"));
48  switch ($next_class) {
49  case strtolower(ilMembershipBlockGUI::class):
50  $ctrl->setReturn($this, "show");
51  $block = new ilMembershipBlockGUI();
52  $ret = $this->ctrl->forwardCommand($block);
53  if ($ret != "") {
54  $this->main_tpl->setContent($ret);
55  }
56  break;
57 
58  default:
59  if ($cmd === "show") {
60  $this->$cmd();
61  }
62  }
63  $this->main_tpl->printToStdout();
64  }
65 
66  protected function show(): void
67  {
68  $main_tpl = $this->main_tpl;
69  $lng = $this->lng;
70 
71  $main_tpl->setTitle($lng->txt("my_courses_groups"));
72  $main_tpl->setTitleIcon(\ilUtil::getImagePath("standard/icon_crgr.svg"));
73 
74  $block = new ilMembershipBlockGUI();
75  $main_tpl->setContent($block->getHTML());
76  }
77 }
getCmd(?string $fallback_command=null)
Returns the command passed with the current POST or GET request and fires an according ilCtrlEvent...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setContent(string $a_html)
Sets content for standard template.
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $main_tpl
global $DIC
Definition: shib_login.php:22
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
Membership overview ilMembershipOverviewGUI: ilMembershipBlockGUI ilMembershipOverviewGUI: ilColumn...
getNextClass($a_gui_class=null)
Returns the fully-qualified classname of the next class in the control flow.
setReturn(object $a_gui_obj, ?string $a_cmd=null)
Sets the return command of a given GUI object.