ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilPDMembershipBlockGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
13{
15 public static $block_type = 'pdmem';
16
21
25 public function __construct($on_mem_overview = false)
26 {
28 $this->lng->loadLanguageModule("dash");
29 $this->lng->loadLanguageModule("mmbr");
30 $this->on_mem_overview = $on_mem_overview;
31 }
32
36 protected function initViewSettings()
37 {
38 $this->viewSettings = new ilPDSelectedItemsBlockViewSettings(
39 $this->user,
41 );
42 $this->viewSettings->parse();
43
44 $this->blockView = ilPDSelectedItemsBlockViewGUI::bySettings($this->viewSettings);
45
46 $this->ctrl->setParameter($this, 'view', $this->viewSettings->getCurrentView());
47 }
48
54 protected function returnToContext()
55 {
56 if ($this->on_mem_overview) {
57 $this->ctrl->redirectByClass('ilmembershipoverviewgui', '');
58 }
59 parent::returnToContext();
60 }
61
66 protected function getViewTitle()
67 {
68 if ($this->on_mem_overview) {
69 return $this->lng->txt("mmbr_memberships");
70 }
71 return parent::getViewTitle();
72 }
73
74
80 public function getNoItemFoundContent() : string
81 {
82 $txt = $this->lng->txt("rep_mo_mem_dash");
83 return $txt;
84 }
85}
user()
Definition: user.php:4
An exception for terminatinating execution or to throw for unit testing.
$on_mem_overview
Is block displayed on membership overview?
__construct($on_mem_overview=false)
ilPDSelectedItemsBlockGUI constructor.
initViewSettings()
Evaluates the view settings of this block.
BlockGUI class for Selected Items on Personal Desktop.
static bySettings(ilPDSelectedItemsBlockViewSettings $viewSettings)
$txt
Definition: error.php:13
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc