ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilContainerLinkListGUI.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
36{
40 protected $lng;
41
45 protected $tree;
46
47 public $ctrl;
48
53 public function __construct()
54 {
55 global $DIC;
56
57 $this->ctrl = $DIC->ctrl();
58 $this->lng = $DIC->language();
59 $this->tree = $DIC->repositoryTree();
60 $ilCtrl = $DIC->ctrl();
61
62 $this->ctrl = &$ilCtrl;
63 }
64
65 public function executeCommand()
66 {
67 $next_class = $this->ctrl->getNextClass($this);
68 $cmd = $this->ctrl->getCmd();
69 //$this->prepareOutput();
70
71 switch ($next_class) {
72 default:
73 $this->$cmd();
74
75 break;
76 }
77 return true;
78 }
79
80 public function show()
81 {
84
86 "tpl.container_link_help.html",
87 true,
88 true,
89 "Services/Container"
90 );
91
92 $type_ordering = array(
93 "cat", "fold", "crs", "grp", "chat", "frm", "lres",
94 "glo", "webr", "file", "exc",
95 "tst", "svy", "mep", "qpl", "spl");
96
97 $childs = $tree->getChilds($_GET["ref_id"]);
98 foreach ($childs as $child) {
99 if (in_array($child["type"], array("lm", "sahs", "htlm"))) {
100 $cnt["lres"]++;
101 } else {
102 $cnt[$child["type"]]++;
103 }
104 }
105
106 $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
107 $tpl->setVariable("TXT_HELP_HEADER", $lng->txt("help"));
108 foreach ($type_ordering as $type) {
109 $tpl->setCurrentBlock("row");
110 $tpl->setVariable("ROWCOL", "tblrow" . ((($i++) % 2) + 1));
111 if ($type != "lres") {
112 $tpl->setVariable("TYPE", $lng->txt("objs_" . $type) .
113 " (" . ((int) $cnt[$type]) . ")");
114 } else {
115 $tpl->setVariable("TYPE", $lng->txt("obj_lrss") .
116 " (" . ((int) $cnt["lres"]) . ")");
117 }
118 $tpl->setVariable("TXT_LINK", "[list-" . $type . "]");
119 $tpl->parseCurrentBlock();
120 }
121 $tpl->printToStdout();
122 exit;
123 }
124} // END class.ilContainerLinkListGUI
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
Class ilContainerLinkListGUI.
__construct()
Constructor @access public.
special template class to simplify handling of ITX/PEAR
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
global $DIC
Definition: goto.php:24
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
exit
Definition: login.php:29
$i
Definition: metadata.php:24
$type