1<?php 2 3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */ 4 5 6include_once("Services/Block/classes/class.ilBlockGUI.php"); 7 8/** 9* BlockGUI class for (centered) Content on Personal Desktop 10* 11* @author Alex Killing <alex.killing@gmx.de> 12* @version $Id$ 13*/ 14class ilDashboardContentBlockGUI extends ilBlockGUI 15{ 16 public static $block_type = "dashcontent"; 17 18 /** 19 * Constructor 20 */ 21 public function __construct() 22 { 23 global $DIC; 24 25 $this->ctrl = $DIC->ctrl(); 26 $this->lng = $DIC->language(); 27 $this->user = $DIC->user(); 28 29 parent::__construct(); 30 31 $this->setEnableNumInfo(false); 32 $this->setLimit(99999); 33 $this->setPresentation(self::PRES_MAIN_LEG); 34 $this->allow_moving = false; 35 } 36 37 /** 38 * @inheritdoc 39 */ 40 public function getBlockType() : string 41 { 42 return self::$block_type; 43 } 44 45 /** 46 * Set Current Item Number. 47 * 48 * @param int $a_currentitemnumber Current Item Number 49 */ 50 public function setCurrentItemNumber($a_currentitemnumber) 51 { 52 $this->currentitemnumber = $a_currentitemnumber; 53 } 54 55 /** 56 * Get Current Item Number. 57 * 58 * @return int Current Item Number 59 */ 60 public function getCurrentItemNumber() 61 { 62 return $this->currentitemnumber; 63 } 64 65 /** 66 * @inheritdoc 67 */ 68 protected function isRepositoryObject() : bool 69 { 70 return false; 71 } 72 73 public function getHTML() 74 { 75 return parent::getHTML(); 76 } 77 78 public function getContent() 79 { 80 return $this->content; 81 } 82 83 public function setContent($a_content) 84 { 85 $this->content = $a_content; 86 } 87 88 /** 89 * Fill data section 90 */ 91 public function fillDataSection() 92 { 93 $this->tpl->setVariable("BLOCK_ROW", $this->getContent()); 94 } 95 96 /** 97 * block footer 98 */ 99 public function fillFooter() 100 { 101 //$this->fillFooterLinks(); 102 $lng = $this->lng; 103 104 if (is_array($this->data)) { 105 $this->max_count = count($this->data); 106 } 107 108 // table footer numinfo 109 if ($this->getEnableNumInfo()) { 110 $numinfo = "(" . $this->getCurrentItemNumber() . " " . 111 strtolower($lng->txt("of")) . " " . $this->max_count . ")"; 112 113 if ($this->max_count > 0) { 114 $this->tpl->setVariable("NUMINFO", $numinfo); 115 } 116 } 117 } 118 119 public function fillPreviousNext() 120 { 121 } 122} 123