ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 
24 include_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 
60  public static function getBlockType()
61  {
62  return self::$block_type;
63  }
64 
70  public function setCurrentItemNumber($a_currentitemnumber)
71  {
72  $this->currentitemnumber = $a_currentitemnumber;
73  }
74 
80  public function getCurrentItemNumber()
81  {
82  return $this->currentitemnumber;
83  }
84 
90  public static function isRepositoryObject()
91  {
92  return false;
93  }
94 
95  public function getHTML()
96  {
97  return parent::getHTML();
98  }
99 
100  public function getContent()
101  {
102  return $this->content;
103  }
104 
105  public function setContent($a_content)
106  {
107  $this->content = $a_content;
108  }
109 
113  public function fillDataSection()
114  {
115  $this->tpl->setVariable("BLOCK_ROW", $this->getContent());
116  }
117 
121  public function fillFooter()
122  {
123  //$this->fillFooterLinks();
124  $lng = $this->lng;
125 
126  if (is_array($this->data)) {
127  $this->max_count = count($this->data);
128  }
129 
130  // table footer numinfo
131  if ($this->getEnableNumInfo()) {
132  $numinfo = "(" . $this->getCurrentItemNumber() . " " .
133  strtolower($lng->txt("of")) . " " . $this->max_count . ")";
134 
135  if ($this->max_count > 0) {
136  $this->tpl->setVariable("NUMINFO", $numinfo);
137  }
138  $this->fillFooterLinks(true, $numinfo);
139  }
140  }
141 
142  public function fillPreviousNext()
143  {
144  }
145 }
Add some data
setBigMode($a_bigmode)
Set Big Mode.
global $DIC
Definition: saml.php:7
static isRepositoryObject()
Get block type.
fillDataSection()
Fill data section.
fillFooterLinks($a_top=false, $a_numinfo="")
Fill footer links.
setCurrentItemNumber($a_currentitemnumber)
Set Current Item Number.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
user()
Definition: user.php:4
$a_content
Definition: workflow.php:93
getEnableNumInfo()
Get Enable Item Number Info.
setLimit($a_limit)
Set Limit.
getCurrentItemNumber()
Get Current Item Number.
This class represents a block method of a block.
static getBlockType()
Get block type.
BlockGUI class for (centered) Content on Personal Desktop.