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 26/** 27* BlockGUI class for dummy block. Only used for moving, if block is not visible 28* 29* @author Alex Killing <alex.killing@gmx.de> 30* @version $Id$ 31* 32* @ilCtrl_IsCalledBy ilDummyBlockGUI: ilColumnGUI 33* @ingroup ServicesBlock 34*/ 35class ilDummyBlockGUI extends ilBlockGUI 36{ 37 /** 38 * @var ilSetting 39 */ 40 protected $settings; 41 42 public static $block_type = ""; 43 44 /** 45 * Constructor 46 */ 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 63 /** 64 * @inheritdoc 65 */ 66 public function getBlockType() : string 67 { 68 return self::$block_type; 69 } 70 71 /** 72 * Set block type 73 * 74 * @return string Block type. 75 */ 76 public static function setBlockType($a_type) 77 { 78 self::$block_type = $a_type; 79 } 80 81 /** 82 * @inheritdoc 83 */ 84 protected function isRepositoryObject() : bool 85 { 86 return false; 87 } 88 89 90 /** 91 * Get Screen Mode for current command. 92 */ 93 public static function getScreenMode() 94 { 95 global $DIC; 96 97 $ilCtrl = $DIC->ctrl(); 98 99 return IL_SCREEN_SIDE; 100 } 101 102 /** 103 * Do most of the initialisation. 104 */ 105 public function setBlock($a_block) 106 { 107 } 108 109 /** 110 * execute command 111 */ 112 public function executeCommand() 113 { 114 $ilCtrl = $this->ctrl; 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 125 /** 126 * Fill data section 127 */ 128 public function fillDataSection() 129 { 130 $lng = $this->lng; 131 132 $this->setDataSection($lng->txt("invisible_block_mess")); 133 } 134 135 /** 136 * Get block HTML code. 137 */ 138 public function getHTML() 139 { 140 $ilCtrl = $this->ctrl; 141 $lng = $this->lng; 142 $ilUser = $this->user; 143 $ilAccess = $this->access; 144 $ilSetting = $this->settings; 145 146 return parent::getHTML(); 147 } 148} 149