ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilGroupedListGUI Class Reference

Grouped list GUI class. More...

+ Collaboration diagram for ilGroupedListGUI:

Public Member Functions

 __construct ()
 Constructor.
 addGroupHeader ($a_content, $a_add_class="")
 Add group header.
 addSeparator ()
 Add separator.
 nextColumn ()
 Add separator.
 addEntry ($a_content, $a_href="", $a_target="", $a_onclick="", $a_add_class="", $a_id="", $a_ttip="", $a_tt_my="right center", $a_tt_at="left center", $a_tt_use_htmlspecialchars=true)
 Add entry.
 getHTML ()
 Get HTML.

Private Attributes

 $multi_column = false
 $items = array()

Detailed Description

Grouped list GUI class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 12 of file class.ilGroupedListGUI.php.

Constructor & Destructor Documentation

ilGroupedListGUI::__construct ( )

Constructor.

Definition at line 20 of file class.ilGroupedListGUI.php.

{
}

Member Function Documentation

ilGroupedListGUI::addEntry (   $a_content,
  $a_href = "",
  $a_target = "",
  $a_onclick = "",
  $a_add_class = "",
  $a_id = "",
  $a_ttip = "",
  $a_tt_my = "right center",
  $a_tt_at = "left center",
  $a_tt_use_htmlspecialchars = true 
)

Add entry.

Parameters
@return

Definition at line 60 of file class.ilGroupedListGUI.php.

{
$this->items[] = array("type" => "entry", "content" => $a_content,
"href" => $a_href, "target" => $a_target, "onclick" => $a_onclick,
"add_class" => $a_add_class, "id" => $a_id, "ttip" => $a_ttip,
"tt_my" => $a_tt_my, "tt_at" => $a_tt_at,
"tt_use_htmlspecialchars" => $a_tt_use_htmlspecialchars);
}
ilGroupedListGUI::addGroupHeader (   $a_content,
  $a_add_class = "" 
)

Add group header.

Parameters
@return

Definition at line 31 of file class.ilGroupedListGUI.php.

{
$this->items[] = array("type" => "group_head", "content" => $a_content,
"add_class" => $a_add_class);
}
ilGroupedListGUI::addSeparator ( )

Add separator.

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

{
$this->items[] = array("type" => "sep");
}
ilGroupedListGUI::getHTML ( )

Get HTML.

Parameters
@return

Definition at line 78 of file class.ilGroupedListGUI.php.

References $ilCtrl, $tpl, and ilTooltipGUI\addTooltip().

{
global $ilCtrl;
$tpl = new ilTemplate("tpl.grouped_list.html", true, true, "Services/UIComponent/GroupedList");
$tt_calls = "";
foreach ($this->items as $i)
{
switch($i["type"])
{
case "sep":
$tpl->touchBlock("sep");
$tpl->touchBlock("item");
break;
case "next_col":
$tpl->touchBlock("next_col");
$tpl->touchBlock("item");
break;
case "group_head":
$tpl->setCurrentBlock("group_head");
if ($i["add_class"] != "")
{
$tpl->setVariable("ADD_CLASS", $i["add_class"]);
}
$tpl->setVariable("GROUP_HEAD", $i["content"]);
$tpl->parseCurrentBlock();
$tpl->touchBlock("item");
break;
case "entry":
if ($i["href"] != "")
{
$tpl->setCurrentBlock("linked_entry");
if ($i["add_class"] != "")
{
$tpl->setVariable("ADD_CLASS", $i["add_class"]);
}
$tpl->setVariable("HREF", $i["href"]);
$tpl->setVariable("TXT_ENTRY", $i["content"]);
if ($i["target"] != "")
{
$tpl->setVariable("TARGET", 'target="'.$i["target"].'"');
}
else
{
$tpl->setVariable("TARGET", 'target="_top"');
}
if ($i["onclick"] != "")
{
$tpl->setVariable("ONCLICK", 'onclick="'.$i["onclick"].'"');
}
if ($i["id"] != "")
{
$tpl->setVariable("ID", 'id="'.$i["id"].'"');
}
$tpl->parseCurrentBlock();
$tpl->touchBlock("item");
if ($i["ttip"] != "" && $i["id"] != "")
{
include_once("./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
if ($ilCtrl->isAsynch())
{
$tt_calls.= " ".ilTooltipGUI::getTooltip($i["id"], $i["ttip"],
"", $i["tt_my"], $i["tt_at"], $i["tt_use_htmlspecialchars"]);
}
else
{
ilTooltipGUI::addTooltip($i["id"], $i["ttip"],
"", $i["tt_my"], $i["tt_at"], $i["tt_use_htmlspecialchars"]);
}
}
}
break;
}
}
if ($this->multi_column)
{
$tpl->touchBlock("multi_start");
$tpl->touchBlock("multi_end");
}
if ($tt_calls != "")
{
$tpl->setCurrentBlock("script");
$tpl->setVariable("TT_CALLS", $tt_calls);
$tpl->parseCurrentBlock();
}
return $tpl->get();
}

+ Here is the call graph for this function:

ilGroupedListGUI::nextColumn ( )

Add separator.

Definition at line 48 of file class.ilGroupedListGUI.php.

{
$this->items[] = array("type" => "next_col");
$this->multi_column = true;
}

Field Documentation

ilGroupedListGUI::$items = array()
private

Definition at line 15 of file class.ilGroupedListGUI.php.

ilGroupedListGUI::$multi_column = false
private

Definition at line 14 of file class.ilGroupedListGUI.php.


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