ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 33 of file class.ilContainerContentGUI.php.

34 {
35 $this->container_gui = $container_gui_obj;
36 $this->container_obj = $this->container_gui->object;
37 }

Member Function Documentation

◆ __forwardToColumnGUI()

ilContainerContentGUI::__forwardToColumnGUI ( )
finalprivate

Get columngui output.

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

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

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().

+ 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
<br>

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

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

Referenced by determinePageEmbeddedBlocks().

+ Here is the caller graph for this function:

◆ clearAdminCommandsDetermination()

ilContainerContentGUI::clearAdminCommandsDetermination ( )
protected

cleaer administration commands determination

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

270 {
271 $this->adminCommands = false;
272 }

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

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

278 {
279 global $rbacsystem;
280
281//echo "-".$a_admin_com_included_in_list."-";
282
283 if (!$this->adminCommands)
284 {
285 if (!$this->getContainerGUI()->isActiveAdministrationPanel())
286 {
287 if ($rbacsystem->checkAccess("delete", $a_ref_id))
288 {
289 $this->adminCommands = true;
290 }
291 }
292 else
293 {
294 $this->adminCommands = $a_admin_com_included_in_list;
295 }
296 }
297 }

References getContainerGUI().

Referenced by renderItem().

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

353 {
354 $type_grps = $this->getGroupedObjTypes();
355
356 // iterate all types
357 foreach ($type_grps as $type => $v)
358 {
359 // set template (overall or type specific)
360 if (is_int(strpos($a_container_page_html, "[list-".$type."]")))
361 {
362 $this->addEmbeddedBlock("type", $type);
363 }
364 }
365
366 // determine item groups
367 while (eregi("\[(item-group-([0-9]*))\]", $a_container_page_html, $found))
368 {
369 $this->addEmbeddedBlock("itgr", (int) $found[2]);
370
371 $a_container_page_html = eregi_replace("\[".$found[1]."\]", $html, $a_container_page_html);
372 }
373 }
getGroupedObjTypes()
Get grouped repository object types.
addEmbeddedBlock($block_type, $block_parameter)
Add embedded block.

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

Referenced by insertPageEmbeddedBlocks().

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

170 {
171 global $ilCtrl, $tpl, $ilDB;
172
173 $ilCtrl->saveParameterByClass("ilcolumngui", "col_return");
174
175 $tpl->addOnLoadCode("il.Object.setRedrawListItemUrl('".
176 $ilCtrl->getLinkTarget($this->container_gui, "redrawListItem", "", true)."');");
177
178 $tpl->addOnLoadCode("il.Object.setRatingUrl('".
179 $ilCtrl->getLinkTargetByClass(array(get_class($this->container_gui), "ilcommonactiondispatchergui", "ilratinggui"),
180 "saveRating", "", true, false)."');");
181
182 switch ($ilCtrl->getNextClass())
183 {
184 case "ilcolumngui":
185 $ilCtrl->setReturn($this->container_gui, "");
186 $html = $this->__forwardToColumnGUI();
187 break;
188
189 default:
190 $ilDB->useSlave(true);
191 $html = $this->getMainContent();
192 $ilDB->useSlave(false);
193 break;
194 }
195
196 return $html;
197 }
global $tpl
Definition: ilias.php:8
__forwardToColumnGUI()
Get columngui output.
global $ilDB

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

Referenced by setOutput().

+ 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

@access protected

Parameters

return

Reimplemented in ilContainerObjectiveGUI, ilContainerByTypeContentGUI, ilContainerSessionsContentGUI, and ilContainerSimpleContentGUI.

Definition at line 46 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 388 of file class.ilContainerContentGUI.php.

389 {
390 return $this->embedded_block;
391 }

◆ getGroupedObjTypes()

ilContainerContentGUI::getGroupedObjTypes ( )

Get grouped repository object types.

Returns
array array of object types

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

656 {
657 global $objDefinition;
658
659 if (empty($this->type_grps))
660 {
661 $this->type_grps =
662 $objDefinition->getGroupedRepositoryObjectTypes($this->getContainerObject()->getType());
663 }
664 return $this->type_grps;
665 }

References getContainerObject().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getIntroduction()

ilContainerContentGUI::getIntroduction ( )

Get introduction.

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

671 {
672 global $ilUser, $lng, $ilCtrl;
673
674 $lng->loadLanguageModule("rep");
675
676 $tpl = new ilTemplate("tpl.rep_intro.html", true, true, "Services/Repository");
677 $tpl->setVariable("IMG_REP_LARGE", ilObject::_getIcon("", "big", "root"));
678 $tpl->setVariable("TXT_WELCOME", $lng->txt("rep_intro"));
679 $tpl->setVariable("TXT_INTRO_1", $lng->txt("rep_intro1"));
680 $tpl->setVariable("TXT_INTRO_2", $lng->txt("rep_intro2"));
681 $tpl->setVariable("TXT_INTRO_3", sprintf($lng->txt("rep_intro3"), $lng->txt("add")));
682 $tpl->setVariable("TXT_INTRO_4", sprintf($lng->txt("rep_intro4"), $lng->txt("cat_add")));
683 $tpl->setVariable("TXT_INTRO_5", $lng->txt("rep_intro5"));
684 $tpl->setVariable("TXT_INTRO_6", $lng->txt("rep_intro6"));
685
686 return $tpl->get();
687 }
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
special template class to simplify handling of ITX/PEAR
global $lng
Definition: privfeed.php:40
global $ilUser
Definition: imgupload.php:15

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

Referenced by ilContainerByTypeContentGUI\getMainContent().

+ 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

return

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

696 {
697 if (is_array($this->items["itgr"]))
698 {
699 foreach ($this->items["itgr"] as $itgr)
700 {
701 if (!$this->renderer->hasCustomBlock($itgr["child"]))
702 {
703 $this->renderItemGroup($itgr);
704
705 $this->renderer->setBlockPosition($itgr["ref_id"], ++$a_pos);
706 }
707 }
708 }
709 return $a_pos;
710 }
renderItemGroup($a_itgr)
Render item group.

References renderItemGroup().

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

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

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

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

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

+ 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.

Reimplemented in ilContainerByTypeContentGUI, ilContainerObjectiveGUI, ilContainerSessionsContentGUI, and ilContainerSimpleContentGUI.

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

120 {
121 global $ilUser, $lng, $ilCtrl, $ilAccess, $ilPluginAdmin;;
122
123 $ilCtrl->saveParameterByClass("ilcolumngui", "col_return");
124
125 $obj_id = ilObject::_lookupObjId($this->getContainerObject()->getRefId());
126 $obj_type = ilObject::_lookupType($obj_id);
127
128 include_once("Services/Block/classes/class.ilColumnGUI.php");
129 $column_gui = new ilColumnGUI($obj_type, IL_COL_RIGHT);
130
131 if ($column_gui->getScreenMode() == IL_SCREEN_FULL)
132 {
133 return "";
134 }
135
136 $this->getContainerGUI()->setColumnSettings($column_gui);
137
138 if ($ilCtrl->getNextClass() == "ilcolumngui" &&
139 $column_gui->getCmdSide() == IL_COL_RIGHT &&
140 $column_gui->getScreenMode() == IL_SCREEN_SIDE)
141 {
142
143 $html = $ilCtrl->forwardCommand($column_gui);
144 }
145 else
146 {
147 if (!$ilCtrl->isAsynch())
148 {
149 $html = "";
150
151 // user interface plugin slot + default rendering
152 include_once("./Services/UIComponent/classes/class.ilUIHookProcessor.php");
153 $uip = new ilUIHookProcessor("Services/Container", "right_column",
154 array("container_content_gui" => $this));
155 if (!$uip->replaced())
156 {
157 $html = $ilCtrl->getHTML($column_gui);
158 }
159 $html = $uip->getHTML($html);
160 }
161 }
162
163 return $html;
164 }
const IL_SCREEN_FULL
UI interface hook processor.

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

Referenced by setOutput().

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

209 {
210 include_once('./Services/Container/classes/class.ilContainerSorting.php');
211 $sorting = ilContainerSorting::_getInstance($this->getContainerObject()->getId());
212
213 include_once "Services/Container/classes/class.ilContainerRenderer.php";
214 $this->renderer = new ilContainerRenderer(
215 ($this->getContainerGUI()->isActiveAdministrationPanel() && !$_SESSION["clipboard"])
216 ,$this->getContainerGUI()->isMultiDownloadEnabled()
217 ,$this->getContainerGUI()->isActiveOrdering() && (get_class($this) != "ilContainerObjectiveGUI") // no block sorting in objective view
218 ,$sorting->getBlockPositions()
219 );
220 }
$_SESSION["AccountId"]
Class ilContainerRenderer.
static _getInstance($a_obj_id)
get instance by obj_id

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

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

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

623 {
624 $this->determinePageEmbeddedBlocks($a_output_html);
625 $this->renderPageEmbeddedBlocks($this->items);
626
627 // iterate all types
628 foreach ($this->getGroupedObjTypes() as $type => $v)
629 {
630 // set template (overall or type specific)
631 if (is_int(strpos($a_output_html, "[list-".$type."]")))
632 {
633 $a_output_html = eregi_replace("\[list-".$type."\]",
634 $this->renderer->renderSingleTypeBlock($type), $a_output_html);
635 }
636 }
637
638 // insert all item groups
639 while (eregi("\[(item-group-([0-9]*))\]", $a_output_html, $found))
640 {
641 $itgr_ref_id = (int) $found[2];
642
643 $a_output_html = eregi_replace("\[".$found[1]."\]",
644 $this->renderer->renderSingleCustomBlock($itgr_ref_id), $a_output_html);
645 }
646
647 return $a_output_html;
648 }
renderPageEmbeddedBlocks()
Render Page Embedded Blocks.
determinePageEmbeddedBlocks($a_container_page_html)
Determine all blocks that are embedded in the container page.

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

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

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

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

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

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

+ 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

return

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

719 {
720 global $ilAccess;
721
722 // #16493
723 $perm_ok = ($ilAccess->checkAccess("visible", "", $a_itgr['ref_id']) &&
724 $ilAccess->checkAccess("read", "", $a_itgr['ref_id']));
725
726 include_once('./Services/Container/classes/class.ilContainerSorting.php');
727 include_once('./Services/Object/classes/class.ilObjectActivation.php');
728 $items = ilObjectActivation::getItemsByItemGroup($a_itgr['ref_id']);
729
730 // if no permission is given, set the items to "rendered" but
731 // do not display the whole block
732 if (!$perm_ok)
733 {
734 foreach($items as $item)
735 {
736 $this->renderer->hideItem($item["child"]);
737 }
738 return;
739 }
740
741 $item_list_gui = $this->getItemGUI($a_itgr);
742 $item_list_gui->enableNotes(false);
743 $item_list_gui->enableTags(false);
744 $item_list_gui->enableComments(false);
745 $item_list_gui->enableTimings(false);
746 $item_list_gui->getListItemHTML($a_itgr["ref_id"], $a_itgr["obj_id"],
747 $a_itgr["title"], $a_itgr["description"]);
748 $commands_html = $item_list_gui->getCommandsHTML();
749
750 include_once("./Modules/ItemGroup/classes/class.ilObjItemGroup.php");
751 if (ilObjItemGroup::lookupHideTitle($a_itgr["obj_id"]) &&
752 !$this->getContainerGUI()->isActiveAdministrationPanel())
753 {
754 $this->renderer->addCustomBlock($a_itgr["ref_id"], "", $commands_html);
755 }
756 else
757 {
758 $this->renderer->addCustomBlock($a_itgr["ref_id"], $a_itgr["title"], $commands_html);
759 }
760
761
762 // render item group sub items
763
765 $this->getContainerObject()->getId())->sortSubItems('itgr', $a_itgr['obj_id'], $items);
766
767 // #18285
769
770 $position = 1;
771 foreach($items as $item)
772 {
773 // we are NOT using hasItem() here, because item might be in multiple item groups
774 $html2 = $this->renderItem($item, $position++, false, "[itgr][".$a_itgr['obj_id']."]");
775 if ($html2 != "")
776 {
777 // :TODO: show it multiple times?
778 $this->renderer->addItemToBlock($a_itgr["ref_id"], $item["type"], $item["child"], $html2, true);
779 }
780 }
781 }
renderItem($a_item_data, $a_position=0, $a_force_icon=false, $a_pos_prefix="")
Render an item.
static lookupHideTitle($a_id)
Lookup hide title.
static getItemsByItemGroup($a_item_group_ref_id)
Get materials of item group.
$html2

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

Referenced by getItemGroupsHTML(), and renderPageEmbeddedBlocks().

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

397 {
398 global $lng;
399
400 // item groups
401 if (is_array($this->embedded_block["itgr"]))
402 {
403 $item_groups = array();
404 if (is_array($this->items["itgr"]))
405 {
406 foreach ($this->items["itgr"] as $ig)
407 {
408 $item_groups[$ig["ref_id"]] = $ig;
409 }
410 }
411
412 foreach ($this->embedded_block["itgr"] as $ref_id)
413 {
414 if(isset($item_groups[$ref_id]))
415 {
416 $this->renderItemGroup($item_groups[$ref_id]);
417 }
418 }
419 }
420
421 // type specific blocks
422 if (is_array($this->embedded_block["type"]))
423 {
424 foreach ($this->embedded_block["type"] as $k => $type)
425 {
426 if (is_array($this->items[$type]) &&
427 $this->renderer->addTypeBlock($type))
428 {
429 // :TODO: obsolete?
430 if($type == 'sess')
431 {
432 $this->items['sess'] = ilUtil::sortArray($this->items['sess'],'start','ASC',true,true);
433 }
434
435 $position = 1;
436
437 foreach($this->items[$type] as $k => $item_data)
438 {
439 if(!$this->renderer->hasItem($item_data["child"]))
440 {
441 $html = $this->renderItem($item_data, $position++);
442 if ($html != "")
443 {
444 $this->renderer->addItemToBlock($type, $item_data["type"], $item_data["child"], $html);
445 }
446 }
447 }
448 }
449 }
450 }
451 }
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
$ref_id
Definition: sahs_server.php:39

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

Referenced by insertPageEmbeddedBlocks().

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

78 {
79 global $tpl, $ilCtrl;
80
81 // note: we do not want to get the center html in case of
82 // asynchronous calls to blocks in the right column (e.g. news)
83 // see #13012
84 if ($ilCtrl->getNextClass() == "ilcolumngui" &&
85 $ilCtrl->isAsynch())
86 {
87 $tpl->setRightContent($this->getRightColumnHTML());
88 }
89
90 // BEGIN ChangeEvent: record read event.
91 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
92 global $ilUser;
93//global $log;
94//$log->write("setOutput");
95
96 $obj_id = ilObject::_lookupObjId($this->getContainerObject()->getRefId());
98 $this->getContainerObject()->getType(),
99 $this->getContainerObject()->getRefId(),
100 $obj_id, $ilUser->getId());
101 // END ChangeEvent: record read event.
102
103
104 $tpl->setContent($this->getCenterColumnHTML());
105
106 // see above, all other cases (this was the old position of setRightContent,
107 // maybe the position above is ok and all ifs can be removed)
108 if ($ilCtrl->getNextClass() != "ilcolumngui" ||
109 !$ilCtrl->isAsynch())
110 {
111 $tpl->setRightContent($this->getRightColumnHTML());
112 }
113
114 }
_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.

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

+ Here is the call graph for this function:

Field Documentation

◆ $container_gui

ilContainerContentGUI::$container_gui

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

Referenced by getContainerGUI().

◆ $container_obj

ilContainerContentGUI::$container_obj

Definition at line 27 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 24 of file class.ilContainerContentGUI.php.

◆ DETAILS_ALL

◆ DETAILS_DEACTIVATED

◆ DETAILS_TITLE


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