ILIAS  release_8 Revision v8.24
class.ilMembershipOverviewGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
27{
29 protected ilLanguage $lng;
31
32 public function __construct()
33 {
34 global $DIC;
35
36 $this->ctrl = $DIC->ctrl();
37 $this->lng = $DIC->language();
38 $this->main_tpl = $DIC->ui()->mainTemplate();
39 }
40
41 public function executeCommand(): void
42 {
44 $next_class = $ctrl->getNextClass($this);
45 $cmd = $ctrl->getCmd("show");
46 $this->main_tpl->setTitleIcon(ilUtil::getImagePath('icon_crgr.svg'));
47 $this->main_tpl->setTitle($this->lng->txt("my_courses_groups"));
48 switch ($next_class) {
49 case "ilpdmembershipblockgui":
50 $ctrl->setReturn($this, "show");
51 $block = new ilPDMembershipBlockGUI(true);
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 {
70
71 $main_tpl->setTitle($lng->txt("my_courses_groups"));
72
73 $block = new ilPDMembershipBlockGUI(true);
74 $main_tpl->setContent($block->getHTML());
75 }
76}
language handling
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $main_tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
global $DIC
Definition: feed.php:28
Interface ilCtrlBaseClassInterface describes ilCtrl base classes.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getCmd(string $fallback_command=null)
Returns the command passed with the current POST or GET request.
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setContent(string $a_html)
Sets content for standard template.
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.