ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilContainerLinkListGUI Class Reference

Class ilContainerLinkListGUI. More...

+ Collaboration diagram for ilContainerLinkListGUI:

Public Member Functions

 __construct ()
 Constructor public. More...
 
 executeCommand ()
 
 show ()
 

Data Fields

 $ctrl
 

Protected Attributes

 $lng
 
 $tree
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilContainerLinkListGUI::__construct ( )

Constructor public.

Definition at line 53 of file class.ilContainerLinkListGUI.php.

References $DIC, and $ilCtrl.

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  }
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18

Member Function Documentation

◆ executeCommand()

ilContainerLinkListGUI::executeCommand ( )

Definition at line 65 of file class.ilContainerLinkListGUI.php.

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  }

◆ show()

ilContainerLinkListGUI::show ( )

Definition at line 80 of file class.ilContainerLinkListGUI.php.

References $_GET, $i, $lng, $tpl, $tree, $type, array, exit, and ilUtil\getStyleSheetLocation().

81  {
82  $lng = $this->lng;
84 
85  $tpl = new ilTemplate(
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("learning_resources") .
116  " (" . ((int) $cnt["lres"]) . ")");
117  }
118  $tpl->setVariable("TXT_LINK", "[list-" . $type . "]");
119  $tpl->parseCurrentBlock();
120  }
121  $tpl->show();
122  exit;
123  }
$type
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
$_GET["client_id"]
$tpl
Definition: ilias.php:10
special template class to simplify handling of ITX/PEAR
Create styles array
The data for the language used.
$i
Definition: disco.tpl.php:19
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilContainerLinkListGUI::$ctrl

Definition at line 47 of file class.ilContainerLinkListGUI.php.

◆ $lng

ilContainerLinkListGUI::$lng
protected

Definition at line 40 of file class.ilContainerLinkListGUI.php.

Referenced by show().

◆ $tree

ilContainerLinkListGUI::$tree
protected

Definition at line 45 of file class.ilContainerLinkListGUI.php.

Referenced by show().


The documentation for this class was generated from the following file: