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

Parent class of all container content GUIs. More...

+ Inheritance diagram for ilContainerContentGUI:
+ Collaboration diagram for ilContainerContentGUI:

Public Member Functions

 __construct (&$container_gui_obj)
 Constructor.
 getContainerObject ()
 Get container object.
 getContainerGUI ()
 Get container GUI object.
 setOutput ()
 Sets view output into column layout.
 getMainContent ()
 Get content HTML for main column, this one must be overwritten in derived classes.
 determinePageEmbeddedBlocks ($a_container_page_html)
 Determine all blocks that are embedded in the container page.
 addEmbeddedBlock ($block_type, $block_parameter)
 Add embedded block.
 getEmbeddedBlocks ()
 Get page embedded blocks.
 renderPageEmbeddedBlocks ()
 Render Page Embedded Blocks.
 renderItem ($a_item_data, $a_position=0, $a_force_icon=false, $a_pos_prefix="")
 Render an item.
 newBlockTemplate ()
 returns a new list block template
 addStandardRow (&$a_tpl, $a_html, $a_ref_id=0)
 add item row to template
 addHeaderRow ($a_tpl, $a_type="", $a_text="")
 Add header row to block template.
 resetRowType ()
 Reset row type (toggling background colors)
 insertPageEmbeddedBlocks ($a_output_html)
 Insert blocks into container page.
 addMessageRow (&$a_tpl, $a_message, $a_type)
 add message row
 addSeparatorRow (&$a_tpl)
 Add separator row between two blocks.
 getGroupedObjTypes ()
 Get grouped repository object types.
 getIntroduction ()
 Get introduction.
 getItemGroupsHTML ($a_tpl)
 Get item groups HTML.
 renderItemGroup ($a_tpl, $a_itgr)
 Render item group.

Data Fields

const DETAILS_DEACTIVATED = 0
const DETAILS_TITLE = 1
const DETAILS_ALL = 2
 $container_gui
 $container_obj

Protected Member Functions

 getDetailsLevel ($a_item_id)
 get details level
 getRightColumnHTML ()
 Get HTML for right column.
 getCenterColumnHTML ()
 Get HTML for center column.
 clearAdminCommandsDetermination ()
 cleaer administration commands determination
 determineAdminCommands ($a_ref_id, $a_admin_com_included_in_list=false)
 determin admin commands
 getItemGUI ($item_data, $a_show_path=false)
 Get ListGUI object for item.

Protected Attributes

 $details_level = self::DETAILS_DEACTIVATED

Private Member Functions

 __forwardToColumnGUI ()
 Get columngui output.

Detailed Description

Parent class of all container content GUIs.

These classes are responsible for displaying the content, i.e. the side column and main column and its subitems in container objects.

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

Definition at line 16 of file class.ilContainerContentGUI.php.

Constructor & Destructor Documentation

ilContainerContentGUI::__construct ( $container_gui_obj)

Constructor.

Definition at line 32 of file class.ilContainerContentGUI.php.

{
$this->container_gui = $container_gui_obj;
$this->container_obj = $this->container_gui->object;
}

Member Function Documentation

ilContainerContentGUI::__forwardToColumnGUI ( )
finalprivate

Get columngui output.

Definition at line 201 of file class.ilContainerContentGUI.php.

References $ilCtrl, ilObject\_lookupObjId(), ilObject\_lookupType(), ilColumnGUI\getCmdSide(), getContainerGUI(), getContainerObject(), getMainContent(), ilColumnGUI\getScreenMode(), IL_COL_LEFT, IL_COL_RIGHT, and IL_SCREEN_SIDE.

Referenced by getCenterColumnHTML().

{
global $ilCtrl, $ilAccess;
include_once("Services/Block/classes/class.ilColumnGUI.php");
// this gets us the subitems we need in setColumnSettings()
// todo: this should be done in ilCourseGUI->getSubItems
$obj_id = ilObject::_lookupObjId($this->getContainerObject()->getRefId());
$obj_type = ilObject::_lookupType($obj_id);
if (!$ilCtrl->isAsynch())
{
//if ($column_gui->getScreenMode() != IL_SCREEN_SIDE)
{
// right column wants center
{
$column_gui = new ilColumnGUI($obj_type, IL_COL_RIGHT);
$this->getContainerGUI()->setColumnSettings($column_gui);
$html = $ilCtrl->forwardCommand($column_gui);
}
// left column wants center
{
$column_gui = new ilColumnGUI($obj_type, IL_COL_LEFT);
$this->getContainerGUI()->setColumnSettings($column_gui);
$html = $ilCtrl->forwardCommand($column_gui);
}
}
else
{
$html = $this->getMainContent();
}
}
return $html;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerContentGUI::addEmbeddedBlock (   $block_type,
  $block_parameter 
)

Add embedded block.

Parameters

Definition at line 344 of file class.ilContainerContentGUI.php.

Referenced by determinePageEmbeddedBlocks().

{
$this->embedded_block[$block_type][] = $block_parameter;
}

+ Here is the caller graph for this function:

ilContainerContentGUI::addHeaderRow (   $a_tpl,
  $a_type = "",
  $a_text = "" 
)

Add header row to block template.

Definition at line 635 of file class.ilContainerContentGUI.php.

References $_SESSION, $ilSetting, $lng, $title, getContainerGUI(), ilUtil\getImagePath(), ilPlugin\lookupTxt(), and resetRowType().

Referenced by ilContainerSimpleContentGUI\__showMaterials(), ilContainerSessionsContentGUI\__showMaterials(), ilContainerILincContentGUI\renderItemList(), ilContainerByTypeContentGUI\renderItemList(), renderPageEmbeddedBlocks(), ilContainerObjectiveGUI\showMaterials(), and ilContainerObjectiveGUI\showObjectives().

{
global $lng, $ilSetting, $objDefinition;
$a_tpl->setVariable("CB_ID", ' id="bl_cntr_'.$this->bl_cnt.'"');
if ($this->getContainerGUI()->isActiveAdministrationPanel() && !$_SESSION["clipboard"])
{
$a_tpl->setCurrentBlock("select_all_row");
$a_tpl->setVariable("CHECKBOXNAME", "bl_cb_".$this->bl_cnt);
$a_tpl->setVariable("SEL_ALL_PARENT", "bl_cntr_".$this->bl_cnt);
$a_tpl->setVariable("SEL_ALL_PARENT", "bl_cntr_".$this->bl_cnt);
$a_tpl->setVariable("TXT_SELECT_ALL", $lng->txt("select_all"));
$a_tpl->parseCurrentBlock();
$this->bl_cnt++;
}
if ($a_text == "" && $a_type != "")
{
if (!$objDefinition->isPlugin($a_type))
{
$title = $lng->txt("objs_".$a_type);
}
else
{
include_once("./Services/Component/classes/class.ilPlugin.php");
$title = ilPlugin::lookupTxt("rep_robj", $a_type, "objs_".$a_type);
}
}
else
{
$title = $a_text;
}
if ($ilSetting->get("icon_position_in_lists") != "item_rows" &&
$a_type != "")
{
$icon = ilUtil::getImagePath("icon_".$a_type.".png");
$a_tpl->setCurrentBlock("container_header_row_image");
$a_tpl->setVariable("HEADER_IMG", $icon);
$a_tpl->setVariable("HEADER_ALT", $title);
}
else
{
$a_tpl->setCurrentBlock("container_header_row");
}
$a_tpl->setVariable("BLOCK_HEADER_CONTENT", $title);
$a_tpl->parseCurrentBlock();
$a_tpl->touchBlock("container_row");
$this->resetRowType();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerContentGUI::addMessageRow ( $a_tpl,
  $a_message,
  $a_type 
)

add message row

Definition at line 740 of file class.ilContainerContentGUI.php.

References $lng, $title, and ilPlugin\lookupTxt().

{
global $lng, $objDefinition;
$this->cur_row_type = ($this->cur_row_type == "row_type_1")
? "row_type_2"
: "row_type_1";
$a_tpl->touchBlock($this->cur_row_type);
if (!$objDefinition->isPlugin($type))
{
$type = $lng->txt("obj_".$a_type);
}
else
{
include_once("./Services/Component/classes/class.ilPlugin.php");
$title = ilPlugin::lookupTxt("rep_robj", $a_type, "objs_".$a_type);
}
$a_message = str_replace("[type]", $type, $a_message);
$a_tpl->setVariable("ROW_NBSP", " ");
$a_tpl->setCurrentBlock("container_standard_row");
$a_tpl->setVariable("BLOCK_ROW_CONTENT",
$a_message);
$a_tpl->parseCurrentBlock();
$a_tpl->touchBlock("container_row");
}

+ Here is the call graph for this function:

ilContainerContentGUI::addSeparatorRow ( $a_tpl)

Add separator row between two blocks.

Definition at line 773 of file class.ilContainerContentGUI.php.

References $lng.

Referenced by ilContainerSessionsContentGUI\__showMaterials(), renderItemGroup(), ilContainerILincContentGUI\renderItemList(), and ilContainerByTypeContentGUI\renderItemList().

{
global $lng;
$a_tpl->setCurrentBlock("container_block");
$a_tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

ilContainerContentGUI::addStandardRow ( $a_tpl,
  $a_html,
  $a_ref_id = 0 
)

add item row to template

Definition at line 607 of file class.ilContainerContentGUI.php.

References $ilSetting, and $lng.

Referenced by ilContainerSimpleContentGUI\__showMaterials(), ilContainerSessionsContentGUI\__showMaterials(), renderItemGroup(), ilContainerILincContentGUI\renderItemList(), ilContainerByTypeContentGUI\renderItemList(), renderPageEmbeddedBlocks(), ilContainerObjectiveGUI\showMaterials(), and ilContainerObjectiveGUI\showObjectives().

{
global $ilSetting, $lng;
$this->cur_row_type = ($this->cur_row_type == "row_type_1")
? "row_type_2"
: "row_type_1";
if ($a_ref_id > 0)
{
$a_tpl->setCurrentBlock($this->cur_row_type);
$a_tpl->setVariable("ROW_ID", 'id="item_row_'.$a_ref_id.'"');
$a_tpl->parseCurrentBlock();
}
else
{
$a_tpl->touchBlock($this->cur_row_type);
}
$a_tpl->setCurrentBlock("container_standard_row");
$a_tpl->setVariable("BLOCK_ROW_CONTENT", $a_html);
$a_tpl->parseCurrentBlock();
$a_tpl->touchBlock("container_row");
}

+ Here is the caller graph for this function:

ilContainerContentGUI::clearAdminCommandsDetermination ( )
protected

cleaer administration commands determination

Definition at line 245 of file class.ilContainerContentGUI.php.

Referenced by ilContainerSimpleContentGUI\__showMaterials(), ilContainerSessionsContentGUI\__showMaterials(), ilContainerByTypeContentGUI\renderItemList(), ilContainerObjectiveGUI\showMaterials(), and ilContainerObjectiveGUI\showObjectives().

{
$this->adminCommands = false;
}

+ Here is the caller graph for this function:

ilContainerContentGUI::determineAdminCommands (   $a_ref_id,
  $a_admin_com_included_in_list = false 
)
protected

determin admin commands

Definition at line 253 of file class.ilContainerContentGUI.php.

References getContainerGUI().

Referenced by renderItem(), and ilContainerObjectiveGUI\renderObjective().

{
global $rbacsystem;
//echo "-".$a_admin_com_included_in_list."-";
if (!$this->adminCommands)
{
if (!$this->getContainerGUI()->isActiveAdministrationPanel())
{
if ($rbacsystem->checkAccess("delete", $a_ref_id))
{
$this->adminCommands = true;
}
}
else
{
$this->adminCommands = $a_admin_com_included_in_list;
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerContentGUI::determinePageEmbeddedBlocks (   $a_container_page_html)

Determine all blocks that are embedded in the container page.

Definition at line 316 of file class.ilContainerContentGUI.php.

References addEmbeddedBlock(), and getGroupedObjTypes().

Referenced by insertPageEmbeddedBlocks().

{
$type_grps = $this->getGroupedObjTypes();
// iterate all types
foreach ($type_grps as $type => $v)
{
// set template (overall or type specific)
if (is_int(strpos($a_container_page_html, "[list-".$type."]")))
{
$this->addEmbeddedBlock("type", $type);
}
}
// determine item groups
while (eregi("\[(item-group-([0-9]*))\]", $a_container_page_html, $found))
{
$this->addEmbeddedBlock("itgr", (int) $found[2]);
$a_container_page_html = eregi_replace("\[".$found[1]."\]", $html, $a_container_page_html);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerContentGUI::getCenterColumnHTML ( )
protected

Get HTML for center column.

Definition at line 168 of file class.ilContainerContentGUI.php.

References $ilCtrl, $tpl, __forwardToColumnGUI(), and getMainContent().

Referenced by setOutput().

{
global $ilCtrl, $tpl;
$ilCtrl->saveParameterByClass("ilcolumngui", "col_return");
$tpl->addOnLoadCode("il.Object.setRedrawListItemUrl('".
$ilCtrl->getLinkTarget($this->container_gui, "redrawListItem", "", true)."');");
switch ($ilCtrl->getNextClass())
{
case "ilcolumngui":
$ilCtrl->setReturn($this->container_gui, "");
$html = $this->__forwardToColumnGUI();
break;
default:
$html = $this->getMainContent();
break;
}
return $html;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerContentGUI::getDetailsLevel (   $a_item_id)
protected

get details level

protected

Parameters
@return

Reimplemented in ilContainerSimpleContentGUI, ilContainerObjectiveGUI, ilContainerSessionsContentGUI, and ilContainerByTypeContentGUI.

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

References $details_level.

Referenced by renderItem().

{
}

+ Here is the caller graph for this function:

ilContainerContentGUI::getEmbeddedBlocks ( )

Get page embedded blocks.

Definition at line 352 of file class.ilContainerContentGUI.php.

{
return $this->embedded_block;
}
ilContainerContentGUI::getGroupedObjTypes ( )

Get grouped repository object types.

Returns
array array of object types

Definition at line 786 of file class.ilContainerContentGUI.php.

References getContainerObject().

Referenced by determinePageEmbeddedBlocks(), insertPageEmbeddedBlocks(), and ilContainerByTypeContentGUI\renderItemList().

{
global $objDefinition;
if (empty($this->type_grps))
{
$this->type_grps =
$objDefinition->getGroupedRepositoryObjectTypes($this->getContainerObject()->getType());
}
return $this->type_grps;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerContentGUI::getIntroduction ( )

Get introduction.

Definition at line 801 of file class.ilContainerContentGUI.php.

References $ilCtrl, $ilUser, $lng, $tpl, and ilUtil\getImagePath().

Referenced by ilContainerByTypeContentGUI\getMainContent().

{
global $ilUser, $lng, $ilCtrl;
$lng->loadLanguageModule("rep");
$tpl = new ilTemplate("tpl.rep_intro.html", true, true, "Services/Repository");
$tpl->setVariable("IMG_REP_LARGE", ilUtil::getImagePath("icon_root_xxl.png"));
$tpl->setVariable("TXT_WELCOME", $lng->txt("rep_intro"));
$tpl->setVariable("TXT_INTRO_1", $lng->txt("rep_intro1"));
$tpl->setVariable("TXT_INTRO_2", $lng->txt("rep_intro2"));
$tpl->setVariable("TXT_INTRO_3", sprintf($lng->txt("rep_intro3"), $lng->txt("add")));
$tpl->setVariable("TXT_INTRO_4", sprintf($lng->txt("rep_intro4"), $lng->txt("cat_add")));
$tpl->setVariable("TXT_INTRO_5", $lng->txt("rep_intro5"));
$tpl->setVariable("TXT_INTRO_6", $lng->txt("rep_intro6"));
return $tpl->get();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerContentGUI::getItemGroupsHTML (   $a_tpl)

Get item groups HTML.

Parameters
@return

Definition at line 826 of file class.ilContainerContentGUI.php.

References renderItemGroup().

Referenced by ilContainerSimpleContentGUI\__showMaterials(), ilContainerSessionsContentGUI\__showMaterials(), ilContainerByTypeContentGUI\renderItemList(), and ilContainerObjectiveGUI\showMaterials().

{
$rendered = false;
if (is_array($this->items["itgr"]))
{
foreach ($this->items["itgr"] as $itgr)
{
if (!$this->rendered_items[$itgr["child"]])
{
$this->renderItemGroup($a_tpl, $itgr);
$rendered = true;
}
}
}
return $rendered;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerContentGUI::getItemGUI (   $item_data,
  $a_show_path = false 
)
protected

Get ListGUI object for item.

Definition at line 278 of file class.ilContainerContentGUI.php.

References ilObjectListGUIFactory\_getListGUIByType(), and getContainerGUI().

Referenced by renderItem(), renderItemGroup(), and ilContainerObjectiveGUI\renderObjective().

{
include_once 'Services/Object/classes/class.ilObjectListGUIFactory.php';
// get item list gui object
if (!is_object ($this->list_gui[$item_data["type"]]))
{
$item_list_gui =& ilObjectListGUIFactory::_getListGUIByType($item_data["type"]);
$item_list_gui->setContainerObject($this->getContainerGUI());
$this->list_gui[$item_data["type"]] =& $item_list_gui;
}
else
{
$item_list_gui =& $this->list_gui[$item_data["type"]];
}
// show administration command buttons (or not)
if (!$this->getContainerGUI()->isActiveAdministrationPanel())
{
// $item_list_gui->enableDelete(false);
// $item_list_gui->enableLink(false);
// $item_list_gui->enableCut(false);
}
// activate common social commands
$item_list_gui->enableComments(true);
$item_list_gui->enableNotes(true);
$item_list_gui->enableTags(true);
// container specific modifications
$this->getContainerGUI()->modifyItemGUI($item_list_gui, $item_data, $a_show_path);
return $item_list_gui;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerContentGUI::getMainContent ( )
abstract

Get content HTML for main column, this one must be overwritten in derived classes.

Reimplemented in ilContainerObjectiveGUI, ilContainerSessionsContentGUI, ilContainerByTypeContentGUI, and ilContainerSimpleContentGUI.

Referenced by __forwardToColumnGUI(), and getCenterColumnHTML().

+ Here is the caller graph for this function:

ilContainerContentGUI::getRightColumnHTML ( )
protected

Get HTML for right column.

Definition at line 118 of file class.ilContainerContentGUI.php.

References $ilCtrl, $ilUser, $lng, ilObject\_lookupObjId(), ilObject\_lookupType(), getContainerGUI(), getContainerObject(), IL_COL_RIGHT, IL_SCREEN_FULL, and IL_SCREEN_SIDE.

Referenced by setOutput().

{
global $ilUser, $lng, $ilCtrl, $ilAccess, $ilPluginAdmin;;
$ilCtrl->saveParameterByClass("ilcolumngui", "col_return");
$obj_id = ilObject::_lookupObjId($this->getContainerObject()->getRefId());
$obj_type = ilObject::_lookupType($obj_id);
include_once("Services/Block/classes/class.ilColumnGUI.php");
$column_gui = new ilColumnGUI($obj_type, IL_COL_RIGHT);
if ($column_gui->getScreenMode() == IL_SCREEN_FULL)
{
return "";
}
$this->getContainerGUI()->setColumnSettings($column_gui);
if ($ilCtrl->getNextClass() == "ilcolumngui" &&
$column_gui->getCmdSide() == IL_COL_RIGHT &&
$column_gui->getScreenMode() == IL_SCREEN_SIDE)
{
$html = $ilCtrl->forwardCommand($column_gui);
}
else
{
if (!$ilCtrl->isAsynch())
{
$html = "";
// user interface plugin slot + default rendering
include_once("./Services/UIComponent/classes/class.ilUIHookProcessor.php");
$uip = new ilUIHookProcessor("Services/Container", "right_column",
array("container_content_gui" => $this));
if (!$uip->replaced())
{
$html = $ilCtrl->getHTML($column_gui);
}
$html = $uip->getHTML($html);
}
}
return $html;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerContentGUI::insertPageEmbeddedBlocks (   $a_output_html)

Insert blocks into container page.

Definition at line 701 of file class.ilContainerContentGUI.php.

References determinePageEmbeddedBlocks(), getGroupedObjTypes(), and renderPageEmbeddedBlocks().

Referenced by ilContainerSimpleContentGUI\__showMaterials(), ilContainerSessionsContentGUI\__showMaterials(), ilContainerByTypeContentGUI\renderItemList(), ilContainerObjectiveGUI\showMaterials(), and ilContainerObjectiveGUI\showObjectives().

{
$this->determinePageEmbeddedBlocks($a_output_html);
$this->renderPageEmbeddedBlocks($this->items);
$type_grps = $this->getGroupedObjTypes();
// iterate all types
foreach ($type_grps as $type => $v)
{
// set template (overall or type specific)
if (is_int(strpos($a_output_html, "[list-".$type."]")))
{
$a_output_html = eregi_replace("\[list-".$type."\]",
$this->rendered_block["type"][$type], $a_output_html);
}
}
// insert all item groups
while (eregi("\[(item-group-([0-9]*))\]", $a_output_html, $found))
{
$itgr_ref_id = (int) $found[2];
// check whether this item group is child -> insert editing html
$html = "";
if (isset($this->rendered_block["itgr"][$itgr_ref_id]))
{
$html = $this->rendered_block["itgr"][$itgr_ref_id];
$this->rendered_items[$itgr_ref_id] = true;
}
$a_output_html = eregi_replace("\[".$found[1]."\]", $html, $a_output_html);
}
return $a_output_html;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerContentGUI::newBlockTemplate ( )

returns a new list block template

private

Returns
object block template

Definition at line 596 of file class.ilContainerContentGUI.php.

References $tpl.

Referenced by ilContainerSimpleContentGUI\__showMaterials(), ilContainerSessionsContentGUI\__showMaterials(), ilContainerILincContentGUI\renderItemList(), ilContainerByTypeContentGUI\renderItemList(), renderPageEmbeddedBlocks(), ilContainerObjectiveGUI\showMaterials(), and ilContainerObjectiveGUI\showObjectives().

{
$tpl = new ilTemplate("tpl.container_list_block.html", true, true,
"Services/Container");
$this->cur_row_type = "row_type_1";
return $tpl;
}

+ Here is the caller graph for this function:

ilContainerContentGUI::renderItem (   $a_item_data,
  $a_position = 0,
  $a_force_icon = false,
  $a_pos_prefix = "" 
)

Render an item.

Parameters
arrayitem data
Returns
string item HTML

Definition at line 449 of file class.ilContainerContentGUI.php.

References $_SESSION, $ilCtrl, $ilSetting, ilContainerSorting\_getInstance(), ilObjectActivation\addListGUIActivationProperty(), ilObjectListGUI\DETAILS_ALL, ilObjectListGUI\DETAILS_MINIMAL, determineAdminCommands(), getContainerGUI(), getContainerObject(), getDetailsLevel(), getItemGUI(), ilObjectActivation\getItemsByEvent(), and ilContainer\SORT_MANUAL.

Referenced by ilContainerSimpleContentGUI\__showMaterials(), ilContainerSessionsContentGUI\__showMaterials(), renderItemGroup(), ilContainerByTypeContentGUI\renderItemList(), renderPageEmbeddedBlocks(), and ilContainerObjectiveGUI\showMaterials().

{
global $ilSetting,$ilAccess,$ilCtrl;
// Pass type, obj_id and tree to checkAccess method to improve performance
if(!$ilAccess->checkAccess('visible','',$a_item_data['ref_id'],$a_item_data['type'],$a_item_data['obj_id'],$a_item_data['tree']))
{
return '';
}
$item_list_gui = $this->getItemGUI($a_item_data);
if ($ilSetting->get("icon_position_in_lists") == "item_rows" ||
$a_item_data["type"] == "sess" || $a_force_icon)
{
$item_list_gui->enableIcon(true);
}
if ($this->getContainerGUI()->isActiveAdministrationPanel() && !$_SESSION["clipboard"])
{
$item_list_gui->enableCheckbox(true);
}
if ($this->getContainerGUI()->isActiveOrdering() && ($a_item_data['type'] != 'sess' || get_class($this) != 'ilContainerSessionsContentGUI'))
{
$item_list_gui->setPositionInputField($a_pos_prefix."[".$a_item_data["ref_id"]."]",
sprintf('%d', (int)$a_position*10));
}
if($a_item_data['type'] == 'sess' and get_class($this) != 'ilContainerObjectiveGUI')
{
switch($this->getDetailsLevel($a_item_data['obj_id']))
{
case self::DETAILS_TITLE:
$item_list_gui->setDetailsLevel(ilObjectListGUI::DETAILS_MINIMAL);
$item_list_gui->enableExpand(true);
$item_list_gui->setExpanded(false);
$item_list_gui->enableDescription(false);
$item_list_gui->enableProperties(true);
break;
case self::DETAILS_ALL:
$item_list_gui->setDetailsLevel(ilObjectListGUI::DETAILS_ALL);
$item_list_gui->enableExpand(true);
$item_list_gui->setExpanded(true);
$item_list_gui->enableDescription(true);
$item_list_gui->enableProperties(true);
break;
default:
$item_list_gui->setDetailsLevel(ilObjectListGUI::DETAILS_ALL);
$item_list_gui->enableExpand(true);
$item_list_gui->enableDescription(true);
$item_list_gui->enableProperties(true);
break;
}
}
// show subitems
if($a_item_data['type'] == 'sess' and (
$this->getDetailsLevel($a_item_data['obj_id']) != self::DETAILS_TITLE or
$this->getContainerGUI()->isActiveAdministrationPanel() or
$this->getContainerGUI()->isActiveOrdering()
)
)
{
$pos = 1;
include_once('./Services/Container/classes/class.ilContainerSorting.php');
include_once('./Services/Object/classes/class.ilObjectActivation.php');
$items = ilObjectActivation::getItemsByEvent($a_item_data['obj_id']);
$items = ilContainerSorting::_getInstance($this->getContainerObject()->getId())->sortSubItems('sess',$a_item_data['obj_id'],$items);
$item_readable = $ilAccess->checkAccess('read','',$a_item_data['ref_id']);
foreach($items as $item)
{
// TODO: this should be removed and be handled by if(strlen($sub_item_html))
// see mantis: 0003944
if(!$ilAccess->checkAccess('visible','',$item['ref_id']))
{
continue;
}
$item_list_gui2 = $this->getItemGUI($item);
$item_list_gui2->enableIcon(true);
$item_list_gui2->enableItemDetailLinks(false);
// @see mantis 10488
if(!$item_readable and !$ilAccess->checkAccess('write','',$item['ref_id']))
{
$item_list_gui2->forceVisibleOnly(true);
}
if ($this->getContainerGUI()->isActiveAdministrationPanel() && !$_SESSION["clipboard"])
{
$item_list_gui2->enableCheckbox(true);
}
if ($this->getContainerGUI()->isActiveOrdering())
{
if ($this->getContainerObject()->getOrderType() == ilContainer::SORT_MANUAL)
{
$item_list_gui2->setPositionInputField("[sess][".$a_item_data['obj_id']."][".$item["ref_id"]."]",
sprintf('%d', (int)$pos*10));
$pos++;
}
}
// #10611
$sub_item_html = $item_list_gui2->getListItemHTML($item['ref_id'],
$item['obj_id'], $item['title'], $item['description']);
$this->determineAdminCommands($item["ref_id"],$item_list_gui2->adminCommandsIncluded());
if(strlen($sub_item_html))
{
$item_list_gui->addSubItemHTML($sub_item_html);
}
}
}
if ($ilSetting->get("item_cmd_asynch"))
{
$asynch = true;
$ilCtrl->setParameter($this->container_gui, "cmdrefid", $a_item_data['ref_id']);
$asynch_url = $ilCtrl->getLinkTarget($this->container_gui,
"getAsynchItemList", "", true, false);
$ilCtrl->setParameter($this->container_gui, "cmdrefid", "");
}
include_once "Services/Object/classes/class.ilObjectActivation.php";
ilObjectActivation::addListGUIActivationProperty($item_list_gui, $a_item_data);
$html = $item_list_gui->getListItemHTML($a_item_data['ref_id'],
$a_item_data['obj_id'], $a_item_data['title'], $a_item_data['description'],
$asynch, false, $asynch_url);
$this->determineAdminCommands($a_item_data["ref_id"],
$item_list_gui->adminCommandsIncluded());
return $html;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerContentGUI::renderItemGroup (   $a_tpl,
  $a_itgr 
)

Render item group.

Parameters
@return

Definition at line 849 of file class.ilContainerContentGUI.php.

References $_SESSION, $lng, ilContainerSorting\_getInstance(), addSeparatorRow(), addStandardRow(), getContainerGUI(), getContainerObject(), getItemGUI(), ilObjectActivation\getItemsByItemGroup(), renderItem(), and resetRowType().

Referenced by getItemGroupsHTML(), and renderPageEmbeddedBlocks().

{
global $ilAccess, $lng;
$perm_ok = $ilAccess->checkAccess("read", "", $a_itgr['ref_id']);
include_once('./Services/Container/classes/class.ilContainerSorting.php');
include_once('./Services/Object/classes/class.ilObjectActivation.php');
$items = ilObjectActivation::getItemsByItemGroup($a_itgr['ref_id']);
$this->getContainerObject()->getId())->sortSubItems('itgr', $a_itgr['obj_id'],$items);
// if no permissoin is given, set the items to "rendered" but
// do not display the whole block
if (!$perm_ok)
{
foreach($items as $item)
{
$this->rendered_items[$item["child"]] = true;
}
return;
}
$item_list_gui = $this->getItemGUI($a_itgr);
$item_list_gui->enableNotes(false);
$item_list_gui->enableTags(false);
$item_list_gui->enableComments(false);
$item_list_gui->enableTimings(false);
$item_list_gui->getListItemHTML($a_itgr["ref_id"], $a_itgr["obj_id"],
$a_itgr["title"], $a_itgr["description"]);
$commands_html = $item_list_gui->getCommandsHTML();
$this->addSeparatorRow($a_tpl);
$a_tpl->setVariable("CB_ID", ' id="bl_cntr_'.$this->bl_cnt.'"');
if ($this->getContainerGUI()->isActiveAdministrationPanel() && !$_SESSION["clipboard"])
{
$a_tpl->setCurrentBlock("select_all_row");
$a_tpl->setVariable("CHECKBOXNAME", "bl_cb_".$this->bl_cnt);
$a_tpl->setVariable("SEL_ALL_PARENT", "bl_cntr_".$this->bl_cnt);
$a_tpl->setVariable("SEL_ALL_PARENT", "bl_cntr_".$this->bl_cnt);
$a_tpl->setVariable("TXT_SELECT_ALL", $lng->txt("select_all"));
$a_tpl->parseCurrentBlock();
$this->bl_cnt++;
}
$a_tpl->setCurrentBlock("container_header_row");
$a_tpl->setVariable("BLOCK_HEADER_CONTENT", $a_itgr["title"]);
$a_tpl->setVariable("CHR_COMMANDS", $commands_html);
$a_tpl->parseCurrentBlock();
$a_tpl->touchBlock("container_row");
$this->resetRowType();
// render item group sub items
$position = 1;
foreach($items as $item)
{
$html2 = $this->renderItem($item, $position++, false, "[itgr][".$a_itgr['obj_id']."]");
if ($html2 != "")
{
$this->addStandardRow($a_tpl, $html2, $item["child"]);
$this->rendered_items[$item["child"]] = true;
}
}
// finish block
$a_tpl->setCurrentBlock("container_block");
$a_tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerContentGUI::renderPageEmbeddedBlocks ( )

Render Page Embedded Blocks.

Definition at line 360 of file class.ilContainerContentGUI.php.

References $lng, $ref_id, $tpl, addHeaderRow(), addStandardRow(), newBlockTemplate(), renderItem(), renderItemGroup(), and ilUtil\sortArray().

Referenced by insertPageEmbeddedBlocks().

{
global $lng;
// first all type specific blocks
if (is_array($this->embedded_block["type"]))
{
// all embedded typed blocks
foreach ($this->embedded_block["type"] as $k => $type)
{
if ($this->rendered_block["type"][$type] == "")
{
if (is_array($this->items[$type]))
{
$tpl = $this->newBlockTemplate();
// the header
$this->addHeaderRow($tpl, $type);
// all rows
$item_rendered = false;
$position = 1;
if($type == 'sess')
{
$this->items['sess'] = ilUtil::sortArray($this->items['sess'],'start','ASC',true,true);
}
foreach($this->items[$type] as $k => $item_data)
{
$html = $this->renderItem($item_data,$position++);
if ($html != "")
{
$this->addStandardRow($tpl, $html, $item_data["child"]);
$item_rendered = true;
$this->rendered_items[$item_data["child"]] = true;
}
}
// if no item has been rendered, add message
if (!$item_rendered)
{
//$this->addMessageRow($tpl, $lng->txt("msg_no_type_accessible"), $type);
$this->rendered_block["type"][$type] = "";
}
else
{
$this->rendered_block["type"][$type] = $tpl->get();
}
}
}
}
}
// all item groups
if (is_array($this->embedded_block["itgr"]))
{
$item_groups = array();
if (is_array($this->items["itgr"]))
{
foreach ($this->items["itgr"] as $ig)
{
$item_groups[$ig["ref_id"]] = $ig;
}
}
// all embedded typed blocks
foreach ($this->embedded_block["itgr"] as $ref_id)
{
// render only item groups of $this->items (valid childs)
if ($this->rendered_block["itgr"][$ref_id] == "" && isset($item_groups[$ref_id]))
{
$tpl = $this->newBlockTemplate();
$this->renderItemGroup($tpl, $item_groups[$ref_id]);
$this->rendered_block["itgr"][$ref_id] = $tpl->get();
}
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilContainerContentGUI::resetRowType ( )

Reset row type (toggling background colors)

Definition at line 693 of file class.ilContainerContentGUI.php.

Referenced by addHeaderRow(), renderItemGroup(), and ilContainerILincContentGUI\renderItemList().

{
$this->cur_row_type = "";
}

+ Here is the caller graph for this function:

ilContainerContentGUI::setOutput ( )

Sets view output into column layout.

This method sets the output of the right and main column in the global standard template.

Definition at line 76 of file class.ilContainerContentGUI.php.

References $ilCtrl, $ilUser, $tpl, ilObject\_lookupObjId(), ilChangeEvent\_recordReadEvent(), getCenterColumnHTML(), getContainerObject(), and getRightColumnHTML().

{
global $tpl, $ilCtrl;
// note: we do not want to get the center html in case of
// asynchronous calls to blocks in the right column (e.g. news)
// see #13012
if ($ilCtrl->getNextClass() == "ilcolumngui" &&
$ilCtrl->isAsynch())
{
$tpl->setRightContent($this->getRightColumnHTML());
}
// BEGIN ChangeEvent: record read event.
require_once('Services/Tracking/classes/class.ilChangeEvent.php');
global $ilUser;
//global $log;
//$log->write("setOutput");
$obj_id = ilObject::_lookupObjId($this->getContainerObject()->getRefId());
$this->getContainerObject()->getType(),
$this->getContainerObject()->getRefId(),
$obj_id, $ilUser->getId());
// END ChangeEvent: record read event.
$tpl->setContent($this->getCenterColumnHTML());
// see above, all other cases (this was the old position of setRightContent,
// maybe the position above is ok and all ifs can be removed)
if ($ilCtrl->getNextClass() != "ilcolumngui" ||
!$ilCtrl->isAsynch())
{
$tpl->setRightContent($this->getRightColumnHTML());
}
}

+ Here is the call graph for this function:

Field Documentation

ilContainerContentGUI::$container_gui

Definition at line 25 of file class.ilContainerContentGUI.php.

Referenced by getContainerGUI().

ilContainerContentGUI::$container_obj

Definition at line 26 of file class.ilContainerContentGUI.php.

Referenced by getContainerObject().

ilContainerContentGUI::$details_level = self::DETAILS_DEACTIVATED
protected

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