ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilDummyBlockGUI.php
Go to the documentation of this file.
1<?php
2/*
3 +-----------------------------------------------------------------------------+
4 | ILIAS open source |
5 +-----------------------------------------------------------------------------+
6 | Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
7 | |
8 | This program is free software; you can redistribute it and/or |
9 | modify it under the terms of the GNU General Public License |
10 | as published by the Free Software Foundation; either version 2 |
11 | of the License, or (at your option) any later version. |
12 | |
13 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU General Public License |
19 | along with this program; if not, write to the Free Software |
20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 +-----------------------------------------------------------------------------+
22*/
23
24include_once("./Services/Block/classes/class.ilBlockGUI.php");
25
36{
40 protected $settings;
41
42 public static $block_type = "";
43
47 public function __construct()
48 {
49 global $DIC;
50
51 $this->ctrl = $DIC->ctrl();
52 $this->lng = $DIC->language();
53 $this->user = $DIC->user();
54 $this->access = $DIC->access();
55 $this->settings = $DIC->settings();
56
57 parent::__construct();
58
59 $this->setLimit(5);
60 $this->allow_moving = true;
61 }
62
66 public function getBlockType() : string
67 {
68 return self::$block_type;
69 }
70
76 public static function setBlockType($a_type)
77 {
78 self::$block_type = $a_type;
79 }
80
84 protected function isRepositoryObject() : bool
85 {
86 return false;
87 }
88
89
93 public static function getScreenMode()
94 {
95 global $DIC;
96
97 $ilCtrl = $DIC->ctrl();
98
99 return IL_SCREEN_SIDE;
100 }
101
105 public function setBlock($a_block)
106 {
107 }
108
112 public function executeCommand()
113 {
115
116 $next_class = $ilCtrl->getNextClass();
117 $cmd = $ilCtrl->getCmd("getHTML");
118
119 switch ($next_class) {
120 default:
121 return $this->$cmd();
122 }
123 }
124
128 public function fillDataSection()
129 {
131
132 $this->setDataSection($lng->txt("invisible_block_mess"));
133 }
134
138 public function getHTML()
139 {
143 $ilAccess = $this->access;
145
146 return parent::getHTML();
147 }
148}
user()
Definition: user.php:4
An exception for terminatinating execution or to throw for unit testing.
const IL_SCREEN_SIDE
This class represents a block method of a block.
setLimit($a_limit)
Set Limit.
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
BlockGUI class for dummy block.
isRepositoryObject()
Returns whether block has a corresponding repository object.bool
static setBlockType($a_type)
Set block type.
fillDataSection()
Fill data section.
setBlock($a_block)
Do most of the initialisation.
static getScreenMode()
Get Screen Mode for current command.
executeCommand()
execute command
getHTML()
Get block HTML code.
__construct()
Constructor.
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:17
global $DIC
Definition: saml.php:7
settings()
Definition: settings.php:2
$ilUser
Definition: imgupload.php:18
$a_type
Definition: workflow.php:92