ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilPDContentBlockGUI.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
33{
34 public static $block_type = "pdcontent";
35
39 public function __construct()
40 {
41 global $DIC;
42
43 $this->ctrl = $DIC->ctrl();
44 $this->lng = $DIC->language();
45 $this->user = $DIC->user();
46
47 parent::__construct();
48
49 $this->setEnableNumInfo(false);
50 $this->setLimit(99999);
51 $this->setBigMode(true);
52 $this->allow_moving = false;
53 }
54
58 public function getBlockType() : string
59 {
60 return self::$block_type;
61 }
62
68 public function setCurrentItemNumber($a_currentitemnumber)
69 {
70 $this->currentitemnumber = $a_currentitemnumber;
71 }
72
78 public function getCurrentItemNumber()
79 {
80 return $this->currentitemnumber;
81 }
82
86 protected function isRepositoryObject() : bool
87 {
88 return false;
89 }
90
91 public function getHTML()
92 {
93 return parent::getHTML();
94 }
95
96 public function getContent()
97 {
98 return $this->content;
99 }
100
101 public function setContent($a_content)
102 {
103 $this->content = $a_content;
104 }
105
109 public function fillDataSection()
110 {
111 $this->tpl->setVariable("BLOCK_ROW", $this->getContent());
112 }
113
117 public function fillFooter()
118 {
119 //$this->fillFooterLinks();
121
122 if (is_array($this->data)) {
123 $this->max_count = count($this->data);
124 }
125
126 // table footer numinfo
127 if ($this->getEnableNumInfo()) {
128 $numinfo = "(" . $this->getCurrentItemNumber() . " " .
129 strtolower($lng->txt("of")) . " " . $this->max_count . ")";
130
131 if ($this->max_count > 0) {
132 $this->tpl->setVariable("NUMINFO", $numinfo);
133 }
134 $this->fillFooterLinks(true, $numinfo);
135 }
136 }
137
138 public function fillPreviousNext()
139 {
140 }
141}
user()
Definition: user.php:4
An exception for terminatinating execution or to throw for unit testing.
This class represents a block method of a block.
setLimit($a_limit)
Set Limit.
fillFooterLinks($a_top=false, $a_numinfo="")
Fill footer links.
setBigMode($a_bigmode)
Set Big Mode.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
getEnableNumInfo()
Get Enable Item Number Info.
BlockGUI class for (centered) Content on Personal Desktop.
setCurrentItemNumber($a_currentitemnumber)
Set Current Item Number.
isRepositoryObject()
Returns whether block has a corresponding repository object.bool
fillPreviousNext()
Fill previous/next row.
getHTML()
Handle config status.
fillDataSection()
Fill data section.
getCurrentItemNumber()
Get Current Item Number.
global $DIC
Definition: saml.php:7
$this data['403_header']
$a_content
Definition: workflow.php:93