ILIAS  release_8 Revision v8.24
class.ilPDMembershipBlockGUI.php
Go to the documentation of this file.
1<?php
2
23{
24 public static string $block_type = 'pdmem';
25
26 // Is block displayed on membership overview?
27 protected bool $on_mem_overview;
28
29 public function __construct(
30 bool $on_mem_overview = false
31 ) {
33 $this->lng->loadLanguageModule("dash");
34 $this->lng->loadLanguageModule("mmbr");
35 $this->on_mem_overview = $on_mem_overview;
36 }
37
38 protected function initViewSettings(): void
39 {
40 $this->viewSettings = new ilPDSelectedItemsBlockViewSettings(
41 $this->user,
43 );
44 $this->viewSettings->parse();
45
46 $this->blockView = ilPDSelectedItemsBlockViewGUI::bySettings($this->viewSettings);
47
48 $this->ctrl->setParameter($this, 'view', $this->viewSettings->getCurrentView());
49 }
50
51 protected function returnToContext(): void
52 {
53 if ($this->on_mem_overview) {
54 $this->ctrl->redirectByClass('ilmembershipoverviewgui', '');
55 }
56 parent::returnToContext();
57 }
58
59 protected function getViewTitle(): string
60 {
61 if ($this->on_mem_overview) {
62 return $this->lng->txt("mmbr_memberships");
63 }
64 return parent::getViewTitle();
65 }
66
67 public function getNoItemFoundContent(): string
68 {
69 $txt = $this->lng->txt("rep_mo_mem_dash");
70 return $txt;
71 }
72}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(bool $on_mem_overview=false)
@ilCtrl_IsCalledBy ilPDSelectedItemsBlockGUI: ilColumnGUI @ilCtrl_Calls ilPDSelectedItemsBlockGUI: il...
static bySettings(ilPDSelectedItemsBlockViewSettings $viewSettings)
$txt
Definition: error.php:13
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc