ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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. More...
 
 getContainerObject ()
 Get container object. More...
 
 getContainerGUI ()
 Get container GUI object. More...
 
 setOutput ()
 Sets view output into column layout. More...
 
 getMainContent ()
 Get content HTML for main column, this one must be overwritten in derived classes. More...
 
 determinePageEmbeddedBlocks ($a_container_page_html)
 Determine all blocks that are embedded in the container page. More...
 
 addEmbeddedBlock ($block_type, $block_parameter)
 Add embedded block. More...
 
 getEmbeddedBlocks ()
 Get page embedded blocks. More...
 
 renderPageEmbeddedBlocks ()
 Render Page Embedded Blocks. More...
 
 renderItem ($a_item_data, $a_position=0, $a_force_icon=false, $a_pos_prefix="")
 Render an item. More...
 
 insertPageEmbeddedBlocks ($a_output_html)
 Insert blocks into container page. More...
 
 getGroupedObjTypes ()
 Get grouped repository object types. More...
 
 getIntroduction ()
 Get introduction. More...
 
 getItemGroupsHTML ($a_pos=0)
 Get item groups HTML. More...
 
 renderItemGroup ($a_itgr)
 Render item group. More...
 

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 More...
 
 getRightColumnHTML ()
 Get HTML for right column. More...
 
 getCenterColumnHTML ()
 Get HTML for center column. More...
 
 initRenderer ()
 Init container renderer. More...
 
 clearAdminCommandsDetermination ()
 cleaer administration commands determination More...
 
 determineAdminCommands ($a_ref_id, $a_admin_com_included_in_list=false)
 determin admin commands More...
 
 getItemGUI ($item_data, $a_show_path=false)
 Get ListGUI object for item. More...
 

Protected Attributes

 $details_level = self::DETAILS_DEACTIVATED
 
 $renderer
 

Private Member Functions

 __forwardToColumnGUI ()
 Get columngui output. More...
 

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

◆ __construct()

ilContainerContentGUI::__construct ( $container_gui_obj)

Constructor.

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

37  {
38  $this->container_gui = $container_gui_obj;
39  $this->container_obj = $this->container_gui->object;
40  }

Member Function Documentation

◆ __forwardToColumnGUI()

ilContainerContentGUI::__forwardToColumnGUI ( )
finalprivate

Get columngui output.

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

References $html, $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().

229  {
230  global $ilCtrl, $ilAccess;
231 
232  include_once("Services/Block/classes/class.ilColumnGUI.php");
233 
234  // this gets us the subitems we need in setColumnSettings()
235  // todo: this should be done in ilCourseGUI->getSubItems
236 
237  $obj_id = ilObject::_lookupObjId($this->getContainerObject()->getRefId());
238  $obj_type = ilObject::_lookupType($obj_id);
239 
240  if (!$ilCtrl->isAsynch())
241  {
242  //if ($column_gui->getScreenMode() != IL_SCREEN_SIDE)
244  {
245  // right column wants center
247  {
248  $column_gui = new ilColumnGUI($obj_type, IL_COL_RIGHT);
249  $this->getContainerGUI()->setColumnSettings($column_gui);
250  $html = $ilCtrl->forwardCommand($column_gui);
251  }
252  // left column wants center
254  {
255  $column_gui = new ilColumnGUI($obj_type, IL_COL_LEFT);
256  $this->getContainerGUI()->setColumnSettings($column_gui);
257  $html = $ilCtrl->forwardCommand($column_gui);
258  }
259  }
260  else
261  {
262  $html = $this->getMainContent();
263  }
264  }
265 
266  return $html;
267  }
static getCmdSide()
Get Column Side of Current Command.
const IL_COL_RIGHT
global $ilCtrl
Definition: ilias.php:18
getMainContent()
Get content HTML for main column, this one must be overwritten in derived classes.
getContainerGUI()
Get container GUI object.
Column user interface class.
static _lookupObjId($a_id)
getContainerObject()
Get container object.
static _lookupType($a_id, $a_reference=false)
lookup object type
static getScreenMode()
Get Screen Mode for current command.
const IL_SCREEN_SIDE
$html
Definition: example_001.php:87
const IL_COL_LEFT
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addEmbeddedBlock()

ilContainerContentGUI::addEmbeddedBlock (   $block_type,
  $block_parameter 
)

Add embedded block.

Parameters

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

Referenced by determinePageEmbeddedBlocks().

384  {
385  $this->embedded_block[$block_type][] = $block_parameter;
386  }
+ Here is the caller graph for this function:

◆ clearAdminCommandsDetermination()

ilContainerContentGUI::clearAdminCommandsDetermination ( )
protected

cleaer administration commands determination

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

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

273  {
274  $this->adminCommands = false;
275  }
+ Here is the caller graph for this function:

◆ determineAdminCommands()

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

determin admin commands

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

References getContainerGUI().

Referenced by renderItem().

281  {
282  global $rbacsystem;
283 
284 //echo "-".$a_admin_com_included_in_list."-";
285 
286  if (!$this->adminCommands)
287  {
288  if (!$this->getContainerGUI()->isActiveAdministrationPanel())
289  {
290  if ($rbacsystem->checkAccess("delete", $a_ref_id))
291  {
292  $this->adminCommands = true;
293  }
294  }
295  else
296  {
297  $this->adminCommands = $a_admin_com_included_in_list;
298  }
299  }
300  }
getContainerGUI()
Get container GUI object.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ determinePageEmbeddedBlocks()

ilContainerContentGUI::determinePageEmbeddedBlocks (   $a_container_page_html)

Determine all blocks that are embedded in the container page.

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

References $html, addEmbeddedBlock(), and getGroupedObjTypes().

Referenced by insertPageEmbeddedBlocks().

356  {
357  $type_grps = $this->getGroupedObjTypes();
358 
359  // iterate all types
360  foreach ($type_grps as $type => $v)
361  {
362  // set template (overall or type specific)
363  if (is_int(strpos($a_container_page_html, "[list-".$type."]")))
364  {
365  $this->addEmbeddedBlock("type", $type);
366  }
367  }
368 
369  // determine item groups
370  while (preg_match('~\[(item-group-([0-9]*))\]~i', $a_container_page_html, $found))
371  {
372  $this->addEmbeddedBlock("itgr", (int) $found[2]);
373 
374  $a_container_page_html = preg_replace('~\['.$found[1].'\]~i', $html, $a_container_page_html);
375  }
376  }
addEmbeddedBlock($block_type, $block_parameter)
Add embedded block.
$html
Definition: example_001.php:87
getGroupedObjTypes()
Get grouped repository object types.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCenterColumnHTML()

ilContainerContentGUI::getCenterColumnHTML ( )
protected

Get HTML for center column.

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

References $html, $ilCtrl, $ilDB, $tpl, __forwardToColumnGUI(), array, and getMainContent().

Referenced by setOutput().

173  {
174  global $ilCtrl, $tpl, $ilDB;
175 
176  $ilCtrl->saveParameterByClass("ilcolumngui", "col_return");
177 
178  $tpl->addOnLoadCode("il.Object.setRedrawListItemUrl('".
179  $ilCtrl->getLinkTarget($this->container_gui, "redrawListItem", "", true)."');");
180 
181  $tpl->addOnLoadCode("il.Object.setRatingUrl('".
182  $ilCtrl->getLinkTargetByClass(array(get_class($this->container_gui), "ilcommonactiondispatchergui", "ilratinggui"),
183  "saveRating", "", true, false)."');");
184 
185  switch ($ilCtrl->getNextClass())
186  {
187  case "ilcolumngui":
188  $this->container_gui->setSideColumnReturn();
189  $html = $this->__forwardToColumnGUI();
190  break;
191 
192  default:
193  $ilDB->useSlave(true);
194  $html = $this->getMainContent();
195  $ilDB->useSlave(false);
196  break;
197  }
198 
199  return $html;
200  }
__forwardToColumnGUI()
Get columngui output.
global $tpl
Definition: ilias.php:8
global $ilCtrl
Definition: ilias.php:18
getMainContent()
Get content HTML for main column, this one must be overwritten in derived classes.
Create styles array
The data for the language used.
global $ilDB
$html
Definition: example_001.php:87
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getContainerGUI()

◆ getContainerObject()

◆ getDetailsLevel()

ilContainerContentGUI::getDetailsLevel (   $a_item_id)
protected

get details level

protected

Parameters

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

References $details_level.

Referenced by renderItem().

+ Here is the caller graph for this function:

◆ getEmbeddedBlocks()

ilContainerContentGUI::getEmbeddedBlocks ( )

Get page embedded blocks.

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

392  {
393  return $this->embedded_block;
394  }

◆ getGroupedObjTypes()

ilContainerContentGUI::getGroupedObjTypes ( )

Get grouped repository object types.

Returns
array array of object types

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

References getContainerObject().

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

667  {
668  global $objDefinition;
669 
670  if (empty($this->type_grps))
671  {
672  $this->type_grps =
673  $objDefinition->getGroupedRepositoryObjectTypes($this->getContainerObject()->getType());
674  }
675  return $this->type_grps;
676  }
getContainerObject()
Get container object.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getIntroduction()

ilContainerContentGUI::getIntroduction ( )

Get introduction.

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

References $ilCtrl, $ilUser, $lng, $tpl, and ilObject\_getIcon().

Referenced by ilContainerByTypeContentGUI\getMainContent().

682  {
683  global $ilUser, $lng, $ilCtrl;
684 
685  $lng->loadLanguageModule("rep");
686 
687  $tpl = new ilTemplate("tpl.rep_intro.html", true, true, "Services/Repository");
688  $tpl->setVariable("IMG_REP_LARGE", ilObject::_getIcon("", "big", "root"));
689  $tpl->setVariable("TXT_WELCOME", $lng->txt("rep_intro"));
690  $tpl->setVariable("TXT_INTRO_1", $lng->txt("rep_intro1"));
691  $tpl->setVariable("TXT_INTRO_2", $lng->txt("rep_intro2"));
692  $tpl->setVariable("TXT_INTRO_3", sprintf($lng->txt("rep_intro3"), $lng->txt("add")));
693  $tpl->setVariable("TXT_INTRO_4", sprintf($lng->txt("rep_intro4"), $lng->txt("cat_add")));
694  $tpl->setVariable("TXT_INTRO_5", $lng->txt("rep_intro5"));
695  $tpl->setVariable("TXT_INTRO_6", $lng->txt("rep_intro6"));
696 
697  return $tpl->get();
698  }
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
global $tpl
Definition: ilias.php:8
global $ilCtrl
Definition: ilias.php:18
special template class to simplify handling of ITX/PEAR
$ilUser
Definition: imgupload.php:18
global $lng
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getItemGroupsHTML()

ilContainerContentGUI::getItemGroupsHTML (   $a_pos = 0)

Get item groups HTML.

Parameters

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

References renderItemGroup().

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

707  {
708  if (is_array($this->items["itgr"]))
709  {
710  foreach ($this->items["itgr"] as $itgr)
711  {
712  if (!$this->renderer->hasCustomBlock($itgr["child"]))
713  {
714  $this->renderItemGroup($itgr);
715 
716  $this->renderer->setBlockPosition($itgr["ref_id"], ++$a_pos);
717  }
718  }
719  }
720  return $a_pos;
721  }
renderItemGroup($a_itgr)
Render item group.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getItemGUI()

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

Get ListGUI object for item.

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

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

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

306  {
307  include_once 'Services/Object/classes/class.ilObjectListGUIFactory.php';
308 
309  // get item list gui object
310  if (!is_object ($this->list_gui[$item_data["type"]]))
311  {
312  $item_list_gui =& ilObjectListGUIFactory::_getListGUIByType($item_data["type"]);
313  $item_list_gui->setContainerObject($this->getContainerGUI());
314  $this->list_gui[$item_data["type"]] =& $item_list_gui;
315  }
316  else
317  {
318  $item_list_gui =& $this->list_gui[$item_data["type"]];
319 
320  }
321 
322  // unique js-ids
323  $item_list_gui->setParentRefId($item_data["parent"]);
324 
325  $item_list_gui->setDefaultCommandParameters(array());
326  $item_list_gui->disableTitleLink(false);
327  $item_list_gui->resetConditionTarget();
328 
329  // show administration command buttons (or not)
330  if (!$this->getContainerGUI()->isActiveAdministrationPanel())
331  {
332 // $item_list_gui->enableDelete(false);
333 // $item_list_gui->enableLink(false);
334 // $item_list_gui->enableCut(false);
335  }
336 
337  // activate common social commands
338  $item_list_gui->enableComments(true);
339  $item_list_gui->enableNotes(true);
340  $item_list_gui->enableTags(true);
341  $item_list_gui->enableRating(true);
342 
343  // reset
344  $item_list_gui->forceVisibleOnly(false);
345 
346  // container specific modifications
347  $this->getContainerGUI()->modifyItemGUI($item_list_gui, $item_data, $a_show_path);
348 
349  return $item_list_gui;
350  }
getContainerGUI()
Get container GUI object.
Create styles array
The data for the language used.
static _getListGUIByType($a_type, $a_context=ilObjectListGUI::CONTEXT_REPOSITORY)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMainContent()

ilContainerContentGUI::getMainContent ( )
abstract

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

Referenced by __forwardToColumnGUI(), and getCenterColumnHTML().

+ Here is the caller graph for this function:

◆ getRightColumnHTML()

ilContainerContentGUI::getRightColumnHTML ( )
protected

Get HTML for right column.

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

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

Referenced by setOutput().

123  {
124  global $ilUser, $lng, $ilCtrl, $ilAccess, $ilPluginAdmin;;
125 
126  $ilCtrl->saveParameterByClass("ilcolumngui", "col_return");
127 
128  $obj_id = ilObject::_lookupObjId($this->getContainerObject()->getRefId());
129  $obj_type = ilObject::_lookupType($obj_id);
130 
131  include_once("Services/Block/classes/class.ilColumnGUI.php");
132  $column_gui = new ilColumnGUI($obj_type, IL_COL_RIGHT);
133 
134  if ($column_gui->getScreenMode() == IL_SCREEN_FULL)
135  {
136  return "";
137  }
138 
139  $this->getContainerGUI()->setColumnSettings($column_gui);
140 
141  if ($ilCtrl->getNextClass() == "ilcolumngui" &&
142  $column_gui->getCmdSide() == IL_COL_RIGHT &&
143  $column_gui->getScreenMode() == IL_SCREEN_SIDE)
144  {
145 
146  $html = $ilCtrl->forwardCommand($column_gui);
147  }
148  else
149  {
150  if (!$ilCtrl->isAsynch())
151  {
152  $html = "";
153 
154  // user interface plugin slot + default rendering
155  include_once("./Services/UIComponent/classes/class.ilUIHookProcessor.php");
156  $uip = new ilUIHookProcessor("Services/Container", "right_column",
157  array("container_content_gui" => $this));
158  if (!$uip->replaced())
159  {
160  $html = $ilCtrl->getHTML($column_gui);
161  }
162  $html = $uip->getHTML($html);
163  }
164  }
165 
166  return $html;
167  }
const IL_COL_RIGHT
UI interface hook processor.
global $ilCtrl
Definition: ilias.php:18
const IL_SCREEN_FULL
getContainerGUI()
Get container GUI object.
Column user interface class.
static _lookupObjId($a_id)
getContainerObject()
Get container object.
$ilUser
Definition: imgupload.php:18
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
global $lng
Definition: privfeed.php:17
const IL_SCREEN_SIDE
$html
Definition: example_001.php:87
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initRenderer()

ilContainerContentGUI::initRenderer ( )
protected

Init container renderer.

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

References $_SESSION, ilContainerSorting\_getInstance(), getContainerGUI(), and getContainerObject().

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

212  {
213  include_once('./Services/Container/classes/class.ilContainerSorting.php');
214  $sorting = ilContainerSorting::_getInstance($this->getContainerObject()->getId());
215 
216  include_once "Services/Container/classes/class.ilContainerRenderer.php";
217  $this->renderer = new ilContainerRenderer(
218  ($this->getContainerGUI()->isActiveAdministrationPanel() && !$_SESSION["clipboard"])
219  ,$this->getContainerGUI()->isMultiDownloadEnabled()
220  ,$this->getContainerGUI()->isActiveOrdering() && (get_class($this) != "ilContainerObjectiveGUI") // no block sorting in objective view
221  ,$sorting->getBlockPositions()
222  );
223  }
$_SESSION["AccountId"]
getContainerGUI()
Get container GUI object.
getContainerObject()
Get container object.
static _getInstance($a_obj_id)
get instance by obj_id
Class ilContainerRenderer.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertPageEmbeddedBlocks()

ilContainerContentGUI::insertPageEmbeddedBlocks (   $a_output_html)

Insert blocks into container page.

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

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

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

634  {
635  $this->determinePageEmbeddedBlocks($a_output_html);
636  $this->renderPageEmbeddedBlocks($this->items);
637 
638  // iterate all types
639  foreach ($this->getGroupedObjTypes() as $type => $v)
640  {
641  // set template (overall or type specific)
642  if (is_int(strpos($a_output_html, "[list-".$type."]")))
643  {
644  $a_output_html = preg_replace('~\[list-'.$type.'\]~i',
645  $this->renderer->renderSingleTypeBlock($type), $a_output_html);
646  }
647  }
648 
649  // insert all item groups
650  while (preg_match('~\[(item-group-([0-9]*))\]~i', $a_output_html, $found))
651  {
652  $itgr_ref_id = (int) $found[2];
653 
654  $a_output_html = preg_replace('~\['.$found[1].'\]~i',
655  $this->renderer->renderSingleCustomBlock($itgr_ref_id), $a_output_html);
656  }
657 
658  return $a_output_html;
659  }
determinePageEmbeddedBlocks($a_container_page_html)
Determine all blocks that are embedded in the container page.
renderPageEmbeddedBlocks()
Render Page Embedded Blocks.
getGroupedObjTypes()
Get grouped repository object types.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderItem()

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 463 of file class.ilContainerContentGUI.php.

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

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

464  {
465  global $ilSetting,$ilAccess,$ilCtrl;
466 
467  // Pass type, obj_id and tree to checkAccess method to improve performance
468  if(!$ilAccess->checkAccess('visible','',$a_item_data['ref_id'],$a_item_data['type'],$a_item_data['obj_id'],$a_item_data['tree']))
469  {
470  return '';
471  }
472  $item_list_gui = $this->getItemGUI($a_item_data);
473  if ($ilSetting->get("icon_position_in_lists") == "item_rows" ||
474  $a_item_data["type"] == "sess" || $a_force_icon)
475  {
476  $item_list_gui->enableIcon(true);
477  }
478 
479  if ($this->getContainerGUI()->isActiveAdministrationPanel() && !$_SESSION["clipboard"])
480  {
481  $item_list_gui->enableCheckbox(true);
482  }
483  else if ($this->getContainerGUI()->isMultiDownloadEnabled())
484  {
485  // display multi download checkboxes
486  $item_list_gui->enableDownloadCheckbox($a_item_data["ref_id"], true);
487  }
488 
489  if ($this->getContainerGUI()->isActiveItemOrdering() && ($a_item_data['type'] != 'sess' || get_class($this) != 'ilContainerSessionsContentGUI'))
490  {
491  $item_list_gui->setPositionInputField($a_pos_prefix."[".$a_item_data["ref_id"]."]",
492  sprintf('%d', (int)$a_position*10));
493  }
494 
495  if($a_item_data['type'] == 'sess' and get_class($this) != 'ilContainerObjectiveGUI')
496  {
497  switch($this->getDetailsLevel($a_item_data['obj_id']))
498  {
499  case self::DETAILS_TITLE:
500  $item_list_gui->setDetailsLevel(ilObjectListGUI::DETAILS_MINIMAL);
501  $item_list_gui->enableExpand(true);
502  $item_list_gui->setExpanded(false);
503  $item_list_gui->enableDescription(false);
504  $item_list_gui->enableProperties(true);
505  break;
506 
507  case self::DETAILS_ALL:
508  $item_list_gui->setDetailsLevel(ilObjectListGUI::DETAILS_ALL);
509  $item_list_gui->enableExpand(true);
510  $item_list_gui->setExpanded(true);
511  $item_list_gui->enableDescription(true);
512  $item_list_gui->enableProperties(true);
513  break;
514 
515  default:
516  $item_list_gui->setDetailsLevel(ilObjectListGUI::DETAILS_ALL);
517  $item_list_gui->enableExpand(true);
518  $item_list_gui->enableDescription(true);
519  $item_list_gui->enableProperties(true);
520  break;
521  }
522  }
523 
524  if(method_exists($this, "addItemDetails"))
525  {
526  $this->addItemDetails($item_list_gui, $a_item_data);
527  }
528 
529  // show subitems
530  if($a_item_data['type'] == 'sess' and (
531  $this->getDetailsLevel($a_item_data['obj_id']) != self::DETAILS_TITLE or
532  $this->getContainerGUI()->isActiveAdministrationPanel() or
533  $this->getContainerGUI()->isActiveItemOrdering()
534  )
535  )
536  {
537  $pos = 1;
538 
539  include_once('./Services/Container/classes/class.ilContainerSorting.php');
540  include_once('./Services/Object/classes/class.ilObjectActivation.php');
541  $items = ilObjectActivation::getItemsByEvent($a_item_data['obj_id']);
542  $items = ilContainerSorting::_getInstance($this->getContainerObject()->getId())->sortSubItems('sess',$a_item_data['obj_id'],$items);
543  $items = ilContainer::getCompleteDescriptions($items);
544 
545  $item_readable = $ilAccess->checkAccess('read','',$a_item_data['ref_id']);
546 
547  foreach($items as $item)
548  {
549  // TODO: this should be removed and be handled by if(strlen($sub_item_html))
550  // see mantis: 0003944
551  if(!$ilAccess->checkAccess('visible','',$item['ref_id']))
552  {
553  continue;
554  }
555 
556  $item_list_gui2 = $this->getItemGUI($item);
557  $item_list_gui2->enableIcon(true);
558  $item_list_gui2->enableItemDetailLinks(false);
559 
560  // unique js-ids
561  $item_list_gui2->setParentRefId($a_item_data['ref_id']);
562 
563  // @see mantis 10488
564  if(!$item_readable and !$ilAccess->checkAccess('write','',$item['ref_id']))
565  {
566  $item_list_gui2->forceVisibleOnly(true);
567  }
568 
569  if ($this->getContainerGUI()->isActiveAdministrationPanel() && !$_SESSION["clipboard"])
570  {
571  $item_list_gui2->enableCheckbox(true);
572  }
573  else if ($this->getContainerGUI()->isMultiDownloadEnabled())
574  {
575  // display multi download checkbox
576  $item_list_gui2->enableDownloadCheckbox($item['ref_id'], true);
577  }
578 
579  if ($this->getContainerGUI()->isActiveItemOrdering())
580  {
581  $item_list_gui2->setPositionInputField("[sess][".$a_item_data['obj_id']."][".$item["ref_id"]."]",
582  sprintf('%d', (int)$pos*10));
583  $pos++;
584  }
585 
586  // #10611
587  ilObjectActivation::addListGUIActivationProperty($item_list_gui2, $item);
588 
589  $sub_item_html = $item_list_gui2->getListItemHTML($item['ref_id'],
590  $item['obj_id'], $item['title'], $item['description']);
591 
592  $this->determineAdminCommands($item["ref_id"],$item_list_gui2->adminCommandsIncluded());
593  if(strlen($sub_item_html))
594  {
595  $item_list_gui->addSubItemHTML($sub_item_html);
596  }
597  }
598  }
599 
600 
601  if ($ilSetting->get("item_cmd_asynch"))
602  {
603  $asynch = true;
604  $ilCtrl->setParameter($this->container_gui, "cmdrefid", $a_item_data['ref_id']);
605  $asynch_url = $ilCtrl->getLinkTarget($this->container_gui,
606  "getAsynchItemList", "", true, false);
607  $ilCtrl->setParameter($this->container_gui, "cmdrefid", "");
608 
609  //#0020343
610  $fold_set = new ilSetting('fold');
611  if ($a_item_data['type'] == 'fold' && $fold_set->get("bgtask_download") && $fold_set->get("enable_download_folder")) {
612  include_once "Services/BackgroundTask/classes/class.ilFolderDownloadBackgroundTaskHandler.php";
614  }
615  }
616 
617  include_once "Services/Object/classes/class.ilObjectActivation.php";
618  ilObjectActivation::addListGUIActivationProperty($item_list_gui, $a_item_data);
619 
620  $html = $item_list_gui->getListItemHTML($a_item_data['ref_id'],
621  $a_item_data['obj_id'], $a_item_data['title'], $a_item_data['description'],
622  $asynch, false, $asynch_url);
623  $this->determineAdminCommands($a_item_data["ref_id"],
624  $item_list_gui->adminCommandsIncluded());
625 
626 
627  return $html;
628  }
determineAdminCommands($a_ref_id, $a_admin_com_included_in_list=false)
determin admin commands
ILIAS Setting Class.
static getItemsByEvent($a_event_id)
Get session material / event items.
$_SESSION["AccountId"]
static initObjectListAction()
init js for background download
getItemGUI($item_data, $a_show_path=false)
Get ListGUI object for item.
global $ilCtrl
Definition: ilias.php:18
getContainerGUI()
Get container GUI object.
getDetailsLevel($a_item_id)
get details level
getContainerObject()
Get container object.
static addListGUIActivationProperty(ilObjectListGUI $a_list_gui, array &$a_item)
Get timing details for list gui.
global $ilSetting
Definition: privfeed.php:17
static _getInstance($a_obj_id)
get instance by obj_id
static getCompleteDescriptions(array $objects)
overwrites description fields to long or short description in an assoc array keys needed (obj_id and ...
$html
Definition: example_001.php:87
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderItemGroup()

ilContainerContentGUI::renderItemGroup (   $a_itgr)

Render item group.

Parameters

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

References $html2, ilContainerSorting\_getInstance(), ilContainer\getCompleteDescriptions(), getContainerGUI(), getContainerObject(), getItemGUI(), ilObjectActivation\getItemsByItemGroup(), ilObjItemGroup\lookupHideTitle(), and renderItem().

Referenced by getItemGroupsHTML(), and renderPageEmbeddedBlocks().

730  {
731  global $ilAccess;
732 
733  // #16493
734  $perm_ok = ($ilAccess->checkAccess("visible", "", $a_itgr['ref_id']) &&
735  $ilAccess->checkAccess("read", "", $a_itgr['ref_id']));
736 
737  include_once('./Services/Container/classes/class.ilContainerSorting.php');
738  include_once('./Services/Object/classes/class.ilObjectActivation.php');
739  $items = ilObjectActivation::getItemsByItemGroup($a_itgr['ref_id']);
740 
741  // if no permission is given, set the items to "rendered" but
742  // do not display the whole block
743  if (!$perm_ok)
744  {
745  foreach($items as $item)
746  {
747  $this->renderer->hideItem($item["child"]);
748  }
749  return;
750  }
751 
752  $item_list_gui = $this->getItemGUI($a_itgr);
753  $item_list_gui->enableNotes(false);
754  $item_list_gui->enableTags(false);
755  $item_list_gui->enableComments(false);
756  $item_list_gui->enableTimings(false);
757  $item_list_gui->getListItemHTML($a_itgr["ref_id"], $a_itgr["obj_id"],
758  $a_itgr["title"], $a_itgr["description"]);
759  $commands_html = $item_list_gui->getCommandsHTML();
760 
761  include_once("./Modules/ItemGroup/classes/class.ilObjItemGroup.php");
762  if (ilObjItemGroup::lookupHideTitle($a_itgr["obj_id"]) &&
763  !$this->getContainerGUI()->isActiveAdministrationPanel())
764  {
765  $this->renderer->addCustomBlock($a_itgr["ref_id"], "", $commands_html);
766  }
767  else
768  {
769  $this->renderer->addCustomBlock($a_itgr["ref_id"], $a_itgr["title"], $commands_html);
770  }
771 
772 
773  // render item group sub items
774 
776  $this->getContainerObject()->getId())->sortSubItems('itgr', $a_itgr['obj_id'], $items);
777 
778  // #18285
779  $items = ilContainer::getCompleteDescriptions($items);
780 
781  $position = 1;
782  foreach($items as $item)
783  {
784  // we are NOT using hasItem() here, because item might be in multiple item groups
785  $html2 = $this->renderItem($item, $position++, false, "[itgr][".$a_itgr['obj_id']."]");
786  if ($html2 != "")
787  {
788  // :TODO: show it multiple times?
789  $this->renderer->addItemToBlock($a_itgr["ref_id"], $item["type"], $item["child"], $html2, true);
790  }
791  }
792  }
static lookupHideTitle($a_id)
Lookup hide title.
$html2
Definition: 42richText.php:71
getItemGUI($item_data, $a_show_path=false)
Get ListGUI object for item.
getContainerGUI()
Get container GUI object.
getContainerObject()
Get container object.
renderItem($a_item_data, $a_position=0, $a_force_icon=false, $a_pos_prefix="")
Render an item.
static getItemsByItemGroup($a_item_group_ref_id)
Get materials of item group.
static _getInstance($a_obj_id)
get instance by obj_id
static getCompleteDescriptions(array $objects)
overwrites description fields to long or short description in an assoc array keys needed (obj_id and ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderPageEmbeddedBlocks()

ilContainerContentGUI::renderPageEmbeddedBlocks ( )

Render Page Embedded Blocks.

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

References $html, $lng, $ref_id, array, renderItem(), renderItemGroup(), and ilUtil\sortArray().

Referenced by insertPageEmbeddedBlocks().

400  {
401  global $lng;
402 
403  // item groups
404  if (is_array($this->embedded_block["itgr"]))
405  {
406  $item_groups = array();
407  if (is_array($this->items["itgr"]))
408  {
409  foreach ($this->items["itgr"] as $ig)
410  {
411  $item_groups[$ig["ref_id"]] = $ig;
412  }
413  }
414 
415  foreach ($this->embedded_block["itgr"] as $ref_id)
416  {
417  if(isset($item_groups[$ref_id]))
418  {
419  $this->renderItemGroup($item_groups[$ref_id]);
420  }
421  }
422  }
423 
424  // type specific blocks
425  if (is_array($this->embedded_block["type"]))
426  {
427  foreach ($this->embedded_block["type"] as $k => $type)
428  {
429  if (is_array($this->items[$type]) &&
430  $this->renderer->addTypeBlock($type))
431  {
432  // :TODO: obsolete?
433  if($type == 'sess')
434  {
435  $this->items['sess'] = ilUtil::sortArray($this->items['sess'],'start','ASC',true,true);
436  }
437 
438  $position = 1;
439 
440  foreach($this->items[$type] as $k => $item_data)
441  {
442  if(!$this->renderer->hasItem($item_data["child"]))
443  {
444  $html = $this->renderItem($item_data, $position++);
445  if ($html != "")
446  {
447  $this->renderer->addItemToBlock($type, $item_data["type"], $item_data["child"], $html);
448  }
449  }
450  }
451  }
452  }
453  }
454  }
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
renderItem($a_item_data, $a_position=0, $a_force_icon=false, $a_pos_prefix="")
Render an item.
Create styles array
The data for the language used.
renderItemGroup($a_itgr)
Render item group.
$ref_id
Definition: sahs_server.php:39
global $lng
Definition: privfeed.php:17
$html
Definition: example_001.php:87
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setOutput()

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 80 of file class.ilContainerContentGUI.php.

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

81  {
82  global $tpl, $ilCtrl;
83 
84  // note: we do not want to get the center html in case of
85  // asynchronous calls to blocks in the right column (e.g. news)
86  // see #13012
87  if ($ilCtrl->getNextClass() == "ilcolumngui" &&
88  $ilCtrl->isAsynch())
89  {
90  $tpl->setRightContent($this->getRightColumnHTML());
91  }
92 
93  // BEGIN ChangeEvent: record read event.
94  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
95  global $ilUser;
96 //global $log;
97 //$log->write("setOutput");
98 
99  $obj_id = ilObject::_lookupObjId($this->getContainerObject()->getRefId());
101  $this->getContainerObject()->getType(),
102  $this->getContainerObject()->getRefId(),
103  $obj_id, $ilUser->getId());
104  // END ChangeEvent: record read event.
105 
106 
107  $tpl->setContent($this->getCenterColumnHTML());
108 
109  // see above, all other cases (this was the old position of setRightContent,
110  // maybe the position above is ok and all ifs can be removed)
111  if ($ilCtrl->getNextClass() != "ilcolumngui" ||
112  !$ilCtrl->isAsynch())
113  {
114  $tpl->setRightContent($this->getRightColumnHTML());
115  }
116 
117  }
global $tpl
Definition: ilias.php:8
global $ilCtrl
Definition: ilias.php:18
static _lookupObjId($a_id)
getContainerObject()
Get container object.
$ilUser
Definition: imgupload.php:18
static _recordReadEvent($a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
getCenterColumnHTML()
Get HTML for center column.
getRightColumnHTML()
Get HTML for right column.
+ Here is the call graph for this function:

Field Documentation

◆ $container_gui

ilContainerContentGUI::$container_gui

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

Referenced by getContainerGUI().

◆ $container_obj

ilContainerContentGUI::$container_obj

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

Referenced by getContainerObject().

◆ $details_level

ilContainerContentGUI::$details_level = self::DETAILS_DEACTIVATED
protected

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

Referenced by getDetailsLevel().

◆ $renderer

ilContainerContentGUI::$renderer
protected

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

◆ DETAILS_ALL

const ilContainerContentGUI::DETAILS_ALL = 2

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

◆ DETAILS_DEACTIVATED

const ilContainerContentGUI::DETAILS_DEACTIVATED = 0

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

◆ DETAILS_TITLE

const ilContainerContentGUI::DETAILS_TITLE = 1

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


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