ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilContainerContentGUI.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 
16 abstract class ilContainerContentGUI
17 {
21  protected $tpl;
22 
26  protected $ctrl;
27 
31  protected $user;
32 
36  protected $lng;
37 
41  protected $access;
42 
46  protected $plugin_admin;
47 
51  protected $db;
52 
56  protected $rbacsystem;
57 
61  protected $settings;
62 
66  protected $obj_definition;
67 
69  const DETAILS_TITLE = 1;
70  const DETAILS_ALL = 2;
71 
72  protected $details_level = self::DETAILS_DEACTIVATED;
73 
77  protected $renderer;
78 
81 
85  protected $log;
86 
91  public function __construct(&$container_gui_obj)
92  {
93  global $DIC;
94 
95  $this->tpl = $DIC["tpl"];
96  $this->ctrl = $DIC->ctrl();
97  $this->user = $DIC->user();
98  $this->lng = $DIC->language();
99  $this->access = $DIC->access();
100  $this->plugin_admin = $DIC["ilPluginAdmin"];
101  $this->db = $DIC->database();
102  $this->rbacsystem = $DIC->rbac()->system();
103  $this->settings = $DIC->settings();
104  $this->obj_definition = $DIC["objDefinition"];
105  $tpl = $DIC["tpl"];
106 
107  $this->container_gui = $container_gui_obj;
108  $this->container_obj = $this->container_gui->object;
109 
110  $tpl->addJavaScript("./Services/Container/js/Container.js");
111 
112  $this->log = ilLoggerFactory::getLogger('cont');
113  }
114 
122  protected function getDetailsLevel($a_item_id)
123  {
124  return $this->details_level;
125  }
126 
132  public function getContainerObject()
133  {
134  return $this->container_obj;
135  }
136 
142  public function getContainerGUI()
143  {
144  return $this->container_gui;
145  }
146 
153  public function setOutput()
154  {
155  $tpl = $this->tpl;
157 
158  // note: we do not want to get the center html in case of
159  // asynchronous calls to blocks in the right column (e.g. news)
160  // see #13012
161  if ($ilCtrl->getNextClass() == "ilcolumngui" &&
162  $ilCtrl->isAsynch()) {
163  $tpl->setRightContent($this->getRightColumnHTML());
164  }
165 
166  // BEGIN ChangeEvent: record read event.
167  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
169  //global $log;
170  //$log->write("setOutput");
171 
172  $obj_id = ilObject::_lookupObjId($this->getContainerObject()->getRefId());
174  $this->getContainerObject()->getType(),
175  $this->getContainerObject()->getRefId(),
176  $obj_id,
177  $ilUser->getId()
178  );
179  // END ChangeEvent: record read event.
180 
181 
182  $tpl->setContent($this->getCenterColumnHTML());
183 
184  // see above, all other cases (this was the old position of setRightContent,
185  // maybe the position above is ok and all ifs can be removed)
186  if ($ilCtrl->getNextClass() != "ilcolumngui" ||
187  !$ilCtrl->isAsynch()) {
188  $tpl->setRightContent($this->getRightColumnHTML());
189  }
190  }
191 
195  protected function getRightColumnHTML()
196  {
198  $lng = $this->lng;
200  $ilAccess = $this->access;
201  $ilPluginAdmin = $this->plugin_admin;
202 
203  $ilCtrl->saveParameterByClass("ilcolumngui", "col_return");
204 
205  $obj_id = ilObject::_lookupObjId($this->getContainerObject()->getRefId());
206  $obj_type = ilObject::_lookupType($obj_id);
207 
208  include_once("Services/Block/classes/class.ilColumnGUI.php");
209  $column_gui = new ilColumnGUI($obj_type, IL_COL_RIGHT);
210 
211  if ($column_gui->getScreenMode() == IL_SCREEN_FULL) {
212  return "";
213  }
214 
215  $this->getContainerGUI()->setColumnSettings($column_gui);
216 
217  if ($ilCtrl->getNextClass() == "ilcolumngui" &&
218  $column_gui->getCmdSide() == IL_COL_RIGHT &&
219  $column_gui->getScreenMode() == IL_SCREEN_SIDE) {
220  $html = $ilCtrl->forwardCommand($column_gui);
221  } else {
222  if (!$ilCtrl->isAsynch()) {
223  $html = "";
224 
225  // user interface plugin slot + default rendering
226  include_once("./Services/UIComponent/classes/class.ilUIHookProcessor.php");
227  $uip = new ilUIHookProcessor(
228  "Services/Container",
229  "right_column",
230  array("container_content_gui" => $this)
231  );
232  if (!$uip->replaced()) {
233  $html = $ilCtrl->getHTML($column_gui);
234  }
235  $html = $uip->getHTML($html);
236  }
237  }
238 
239  return $html;
240  }
241 
245  protected function getCenterColumnHTML()
246  {
248  $tpl = $this->tpl;
249  $ilDB = $this->db;
250 
251  $ilCtrl->saveParameterByClass("ilcolumngui", "col_return");
252 
253  $tpl->addOnLoadCode("il.Object.setRedrawListItemUrl('" .
254  $ilCtrl->getLinkTarget($this->container_gui, "redrawListItem", "", true) . "');");
255 
256  $tpl->addOnLoadCode("il.Object.setRatingUrl('" .
257  $ilCtrl->getLinkTargetByClass(
258  array(get_class($this->container_gui), "ilcommonactiondispatchergui", "ilratinggui"),
259  "saveRating",
260  "",
261  true,
262  false
263  ) . "');");
264 
265  switch ($ilCtrl->getNextClass()) {
266  case "ilcolumngui":
267  $this->container_gui->setSideColumnReturn();
268  $html = $this->__forwardToColumnGUI();
269  break;
270 
271  default:
272  $ilDB->useSlave(true);
273  $html = $this->getMainContent();
274  $ilDB->useSlave(false);
275  break;
276  }
277 
278  return $html;
279  }
280 
285  abstract public function getMainContent();
286 
290  protected function initRenderer()
291  {
292  include_once('./Services/Container/classes/class.ilContainerSorting.php');
293  $sorting = ilContainerSorting::_getInstance($this->getContainerObject()->getId());
294 
295  include_once "Services/Container/classes/class.ilContainerRenderer.php";
296  $this->renderer = new ilContainerRenderer(
297  ($this->getContainerGUI()->isActiveAdministrationPanel() && !$_SESSION["clipboard"]),
298  $this->getContainerGUI()->isMultiDownloadEnabled(),
299  $this->getContainerGUI()->isActiveOrdering() && (get_class($this) != "ilContainerObjectiveGUI") // no block sorting in objective view
300  ,
301  $sorting->getBlockPositions()
302  );
303  }
304 
308  final private function __forwardToColumnGUI()
309  {
311  $ilAccess = $this->access;
312 
313  include_once("Services/Block/classes/class.ilColumnGUI.php");
314 
315  // this gets us the subitems we need in setColumnSettings()
316  // todo: this should be done in ilCourseGUI->getSubItems
317 
318  $obj_id = ilObject::_lookupObjId($this->getContainerObject()->getRefId());
319  $obj_type = ilObject::_lookupType($obj_id);
320 
321  if (!$ilCtrl->isAsynch()) {
322  //if ($column_gui->getScreenMode() != IL_SCREEN_SIDE)
324  // right column wants center
326  $column_gui = new ilColumnGUI($obj_type, IL_COL_RIGHT);
327  $this->getContainerGUI()->setColumnSettings($column_gui);
328  $html = $ilCtrl->forwardCommand($column_gui);
329  }
330  // left column wants center
332  $column_gui = new ilColumnGUI($obj_type, IL_COL_LEFT);
333  $this->getContainerGUI()->setColumnSettings($column_gui);
334  $html = $ilCtrl->forwardCommand($column_gui);
335  }
336  } else {
337  $html = $this->getMainContent();
338  }
339  }
340 
341  return $html;
342  }
343 
347  protected function clearAdminCommandsDetermination()
348  {
349  $this->adminCommands = false;
350  }
351 
355  protected function determineAdminCommands($a_ref_id, $a_admin_com_included_in_list = false)
356  {
358 
359  //echo "-".$a_admin_com_included_in_list."-";
360 
361  if (!$this->adminCommands) {
362  if (!$this->getContainerGUI()->isActiveAdministrationPanel()) {
363  if ($rbacsystem->checkAccess("delete", $a_ref_id)) {
364  $this->adminCommands = true;
365  }
366  } else {
367  $this->adminCommands = $a_admin_com_included_in_list;
368  }
369  }
370  }
371 
375  protected function getItemGUI($item_data, $a_show_path = false)
376  {
377  include_once 'Services/Object/classes/class.ilObjectListGUIFactory.php';
378 
379  // get item list gui object
380  if (!is_object($this->list_gui[$item_data["type"]])) {
381  $item_list_gui =&ilObjectListGUIFactory::_getListGUIByType($item_data["type"]);
382  $item_list_gui->setContainerObject($this->getContainerGUI());
383  $this->list_gui[$item_data["type"]] =&$item_list_gui;
384  } else {
385  $item_list_gui =&$this->list_gui[$item_data["type"]];
386  }
387 
388  // unique js-ids
389  $item_list_gui->setParentRefId($item_data["parent"]);
390 
391  $item_list_gui->setDefaultCommandParameters(array());
392  $item_list_gui->disableTitleLink(false);
393  $item_list_gui->resetConditionTarget();
394 
395  // show administration command buttons (or not)
396  if (!$this->getContainerGUI()->isActiveAdministrationPanel()) {
397  // $item_list_gui->enableDelete(false);
398 // $item_list_gui->enableLink(false);
399 // $item_list_gui->enableCut(false);
400  }
401 
402  // activate common social commands
403  $item_list_gui->enableComments(true);
404  $item_list_gui->enableNotes(true);
405  $item_list_gui->enableTags(true);
406  $item_list_gui->enableRating(true);
407 
408  // reset
409  $item_list_gui->forceVisibleOnly(false);
410 
411  // container specific modifications
412  $this->getContainerGUI()->modifyItemGUI($item_list_gui, $item_data, $a_show_path);
413 
414  return $item_list_gui;
415  }
416 
420  public function determinePageEmbeddedBlocks($a_container_page_html)
421  {
422  $type_grps = $this->getGroupedObjTypes();
423 
424  // iterate all types
425  foreach ($type_grps as $type => $v) {
426  // set template (overall or type specific)
427  if (is_int(strpos($a_container_page_html, "[list-" . $type . "]"))) {
428  $this->addEmbeddedBlock("type", $type);
429  }
430  }
431 
432  // determine item groups
433  while (preg_match('~\[(item-group-([0-9]*))\]~i', $a_container_page_html, $found)) {
434  $this->addEmbeddedBlock("itgr", (int) $found[2]);
435 
436  $a_container_page_html = preg_replace('~\[' . $found[1] . '\]~i', $html, $a_container_page_html);
437  }
438  }
439 
445  public function addEmbeddedBlock($block_type, $block_parameter)
446  {
447  $this->embedded_block[$block_type][] = $block_parameter;
448  }
449 
453  public function getEmbeddedBlocks()
454  {
455  return $this->embedded_block;
456  }
457 
461  public function renderPageEmbeddedBlocks()
462  {
463  $lng = $this->lng;
464 
465  // item groups
466  if (is_array($this->embedded_block["itgr"])) {
467  $item_groups = array();
468  if (is_array($this->items["itgr"])) {
469  foreach ($this->items["itgr"] as $ig) {
470  $item_groups[$ig["ref_id"]] = $ig;
471  }
472  }
473 
474  foreach ($this->embedded_block["itgr"] as $ref_id) {
475  if (isset($item_groups[$ref_id])) {
476  $this->renderItemGroup($item_groups[$ref_id]);
477  }
478  }
479  }
480 
481  // type specific blocks
482  if (is_array($this->embedded_block["type"])) {
483  foreach ($this->embedded_block["type"] as $k => $type) {
484  if (is_array($this->items[$type]) &&
485  $this->renderer->addTypeBlock($type)) {
486  // :TODO: obsolete?
487  if ($type == 'sess') {
488  $this->items['sess'] = ilUtil::sortArray($this->items['sess'], 'start', 'ASC', true, true);
489  }
490 
491  $position = 1;
492 
493  foreach ($this->items[$type] as $k => $item_data) {
494  if (!$this->renderer->hasItem($item_data["child"])) {
495  $html = $this->renderItem($item_data, $position++);
496  if ($html != "") {
497  $this->renderer->addItemToBlock($type, $item_data["type"], $item_data["child"], $html);
498  }
499  }
500  }
501  }
502  }
503  }
504  }
505 
513  public function renderItem($a_item_data, $a_position = 0, $a_force_icon = false, $a_pos_prefix = "")
514  {
516  $ilAccess = $this->access;
518 
519  // Pass type, obj_id and tree to checkAccess method to improve performance
520  if (!$ilAccess->checkAccess('visible', '', $a_item_data['ref_id'], $a_item_data['type'], $a_item_data['obj_id'], $a_item_data['tree'])) {
521  return '';
522  }
523  $item_list_gui = $this->getItemGUI($a_item_data);
524  if ($ilSetting->get("icon_position_in_lists") == "item_rows" ||
525  $a_item_data["type"] == "sess" || $a_force_icon) {
526  $item_list_gui->enableIcon(true);
527  }
528 
529  if ($this->getContainerGUI()->isActiveAdministrationPanel() && !$_SESSION["clipboard"]) {
530  $item_list_gui->enableCheckbox(true);
531  } elseif ($this->getContainerGUI()->isMultiDownloadEnabled()) {
532  // display multi download checkboxes
533  $item_list_gui->enableDownloadCheckbox($a_item_data["ref_id"], true);
534  }
535 
536  if ($this->getContainerGUI()->isActiveItemOrdering() && ($a_item_data['type'] != 'sess' || get_class($this) != 'ilContainerSessionsContentGUI')) {
537  $item_list_gui->setPositionInputField(
538  $a_pos_prefix . "[" . $a_item_data["ref_id"] . "]",
539  sprintf('%d', (int) $a_position*10)
540  );
541  }
542 
543  if ($a_item_data['type'] == 'sess' and get_class($this) != 'ilContainerObjectiveGUI') {
544  switch ($this->getDetailsLevel($a_item_data['obj_id'])) {
545  case self::DETAILS_TITLE:
546  $item_list_gui->setDetailsLevel(ilObjectListGUI::DETAILS_MINIMAL);
547  $item_list_gui->enableExpand(true);
548  $item_list_gui->setExpanded(false);
549  $item_list_gui->enableDescription(false);
550  $item_list_gui->enableProperties(true);
551  break;
552 
553  case self::DETAILS_ALL:
554  $item_list_gui->setDetailsLevel(ilObjectListGUI::DETAILS_ALL);
555  $item_list_gui->enableExpand(true);
556  $item_list_gui->setExpanded(true);
557  $item_list_gui->enableDescription(true);
558  $item_list_gui->enableProperties(true);
559  break;
560 
561  default:
562  $item_list_gui->setDetailsLevel(ilObjectListGUI::DETAILS_ALL);
563  $item_list_gui->enableExpand(true);
564  $item_list_gui->enableDescription(true);
565  $item_list_gui->enableProperties(true);
566  break;
567  }
568  }
569 
570  if (method_exists($this, "addItemDetails")) {
571  $this->addItemDetails($item_list_gui, $a_item_data);
572  }
573 
574  // show subitems
575  if ($a_item_data['type'] == 'sess' and (
576  $this->getDetailsLevel($a_item_data['obj_id']) != self::DETAILS_TITLE or
577  $this->getContainerGUI()->isActiveAdministrationPanel() or
578  $this->getContainerGUI()->isActiveItemOrdering()
579  )
580  ) {
581  $pos = 1;
582 
583  include_once('./Services/Container/classes/class.ilContainerSorting.php');
584  include_once('./Services/Object/classes/class.ilObjectActivation.php');
585  $items = ilObjectActivation::getItemsByEvent($a_item_data['obj_id']);
586  $items = ilContainerSorting::_getInstance($this->getContainerObject()->getId())->sortSubItems('sess', $a_item_data['obj_id'], $items);
587  $items = ilContainer::getCompleteDescriptions($items);
588 
589  $item_readable = $ilAccess->checkAccess('read', '', $a_item_data['ref_id']);
590 
591  foreach ($items as $item) {
592  // TODO: this should be removed and be handled by if(strlen($sub_item_html))
593  // see mantis: 0003944
594  if (!$ilAccess->checkAccess('visible', '', $item['ref_id'])) {
595  continue;
596  }
597 
598  $item_list_gui2 = $this->getItemGUI($item);
599  $item_list_gui2->enableIcon(true);
600  $item_list_gui2->enableItemDetailLinks(false);
601 
602  // unique js-ids
603  $item_list_gui2->setParentRefId($a_item_data['ref_id']);
604 
605  // @see mantis 10488
606  if (!$item_readable and !$ilAccess->checkAccess('write', '', $item['ref_id'])) {
607  $item_list_gui2->forceVisibleOnly(true);
608  }
609 
610  if ($this->getContainerGUI()->isActiveAdministrationPanel() && !$_SESSION["clipboard"]) {
611  $item_list_gui2->enableCheckbox(true);
612  } elseif ($this->getContainerGUI()->isMultiDownloadEnabled()) {
613  // display multi download checkbox
614  $item_list_gui2->enableDownloadCheckbox($item['ref_id'], true);
615  }
616 
617  if ($this->getContainerGUI()->isActiveItemOrdering()) {
618  $item_list_gui2->setPositionInputField(
619  "[sess][" . $a_item_data['obj_id'] . "][" . $item["ref_id"] . "]",
620  sprintf('%d', (int) $pos*10)
621  );
622  $pos++;
623  }
624 
625  // #10611
626  ilObjectActivation::addListGUIActivationProperty($item_list_gui2, $item);
627 
628  $sub_item_html = $item_list_gui2->getListItemHTML(
629  $item['ref_id'],
630  $item['obj_id'],
631  $item['title'],
632  $item['description']
633  );
634 
635  $this->determineAdminCommands($item["ref_id"], $item_list_gui2->adminCommandsIncluded());
636  if (strlen($sub_item_html)) {
637  $item_list_gui->addSubItemHTML($sub_item_html);
638  }
639  }
640  }
641 
642 
643  if ($ilSetting->get("item_cmd_asynch")) {
644  $asynch = true;
645  $ilCtrl->setParameter($this->container_gui, "cmdrefid", $a_item_data['ref_id']);
646  $asynch_url = $ilCtrl->getLinkTarget(
647  $this->container_gui,
648  "getAsynchItemList",
649  "",
650  true,
651  false
652  );
653  $ilCtrl->setParameter($this->container_gui, "cmdrefid", "");
654 
655  //#0020343
656  $fold_set = new ilSetting('fold');
657  if ($a_item_data['type'] == 'fold' && $fold_set->get("bgtask_download") && $fold_set->get("enable_download_folder")) {
658  include_once "Services/BackgroundTask/classes/class.ilFolderDownloadBackgroundTaskHandler.php";
660  }
661  }
662 
663  include_once "Services/Object/classes/class.ilObjectActivation.php";
664  ilObjectActivation::addListGUIActivationProperty($item_list_gui, $a_item_data);
665 
666  $html = $item_list_gui->getListItemHTML(
667  $a_item_data['ref_id'],
668  $a_item_data['obj_id'],
669  $a_item_data['title'],
670  $a_item_data['description'],
671  $asynch,
672  false,
673  $asynch_url
674  );
675  $this->determineAdminCommands(
676  $a_item_data["ref_id"],
677  $item_list_gui->adminCommandsIncluded()
678  );
679 
680 
681  return $html;
682  }
683 
687  public function insertPageEmbeddedBlocks($a_output_html)
688  {
689  $this->determinePageEmbeddedBlocks($a_output_html);
690  $this->renderPageEmbeddedBlocks($this->items);
691 
692  // iterate all types
693  foreach ($this->getGroupedObjTypes() as $type => $v) {
694  // set template (overall or type specific)
695  if (is_int(strpos($a_output_html, "[list-" . $type . "]"))) {
696  $a_output_html = preg_replace(
697  '~\[list-' . $type . '\]~i',
698  $this->renderer->renderSingleTypeBlock($type),
699  $a_output_html
700  );
701  }
702  }
703 
704  // insert all item groups
705  while (preg_match('~\[(item-group-([0-9]*))\]~i', $a_output_html, $found)) {
706  $itgr_ref_id = (int) $found[2];
707 
708  $a_output_html = preg_replace(
709  '~\[' . $found[1] . '\]~i',
710  $this->renderer->renderSingleCustomBlock($itgr_ref_id),
711  $a_output_html
712  );
713  }
714 
715  return $a_output_html;
716  }
717 
723  public function getGroupedObjTypes()
724  {
725  $objDefinition = $this->obj_definition;
726 
727  if (empty($this->type_grps)) {
728  $this->type_grps =
729  $objDefinition->getGroupedRepositoryObjectTypes($this->getContainerObject()->getType());
730  }
731  return $this->type_grps;
732  }
733 
737  public function getIntroduction()
738  {
740  $lng = $this->lng;
742 
743  $lng->loadLanguageModule("rep");
744 
745  $tpl = new ilTemplate("tpl.rep_intro.html", true, true, "Services/Repository");
746  $tpl->setVariable("IMG_REP_LARGE", ilObject::_getIcon("", "big", "root"));
747  $tpl->setVariable("TXT_WELCOME", $lng->txt("rep_intro"));
748  $tpl->setVariable("TXT_INTRO_1", $lng->txt("rep_intro1"));
749  $tpl->setVariable("TXT_INTRO_2", $lng->txt("rep_intro2"));
750  $tpl->setVariable("TXT_INTRO_3", sprintf($lng->txt("rep_intro3"), $lng->txt("add")));
751  $tpl->setVariable("TXT_INTRO_4", sprintf($lng->txt("rep_intro4"), $lng->txt("cat_add")));
752  $tpl->setVariable("TXT_INTRO_5", $lng->txt("rep_intro5"));
753  $tpl->setVariable("TXT_INTRO_6", $lng->txt("rep_intro6"));
754 
755  return $tpl->get();
756  }
757 
764  public function getItemGroupsHTML($a_pos = 0)
765  {
766  if (is_array($this->items["itgr"])) {
767  foreach ($this->items["itgr"] as $itgr) {
768  if (!$this->renderer->hasCustomBlock($itgr["child"])) {
769  $this->renderItemGroup($itgr);
770 
771  $this->renderer->setBlockPosition($itgr["ref_id"], ++$a_pos);
772  }
773  }
774  }
775  return $a_pos;
776  }
777 
784  public function renderItemGroup($a_itgr)
785  {
786  $ilAccess = $this->access;
788 
789  // #16493
790  $perm_ok = ($ilAccess->checkAccess("visible", "", $a_itgr['ref_id']) &&
791  $ilAccess->checkAccess("read", "", $a_itgr['ref_id']));
792 
793  include_once('./Services/Container/classes/class.ilContainerSorting.php');
794  include_once('./Services/Object/classes/class.ilObjectActivation.php');
795  $items = ilObjectActivation::getItemsByItemGroup($a_itgr['ref_id']);
796 
797  // if no permission is given, set the items to "rendered" but
798  // do not display the whole block
799  if (!$perm_ok) {
800  foreach ($items as $item) {
801  $this->renderer->hideItem($item["child"]);
802  }
803  return;
804  }
805 
806  $item_list_gui = $this->getItemGUI($a_itgr);
807  $item_list_gui->enableNotes(false);
808  $item_list_gui->enableTags(false);
809  $item_list_gui->enableComments(false);
810  $item_list_gui->enableTimings(false);
811  $item_list_gui->getListItemHTML(
812  $a_itgr["ref_id"],
813  $a_itgr["obj_id"],
814  $a_itgr["title"],
815  $a_itgr["description"]
816  );
817  $commands_html = $item_list_gui->getCommandsHTML();
818 
819  // determine behaviour
820  include_once("./Modules/ItemGroup/classes/class.ilObjItemGroup.php");
821  include_once("./Modules/ItemGroup/classes/class.ilItemGroupBehaviour.php");
822  $beh = ilObjItemGroup::lookupBehaviour($a_itgr["obj_id"]);
823  include_once("./Services/Container/classes/class.ilContainerBlockPropertiesStorage.php");
824  $stored_val = ilContainerBlockPropertiesStorage::getProperty("itgr_" . $a_itgr["ref_id"], $ilUser->getId(), "opened");
825  if ($stored_val !== false && $beh != ilItemGroupBehaviour::ALWAYS_OPEN) {
826  $beh = ($stored_val == "1")
829  }
830 
831  $data = array(
832  "behaviour" => $beh,
833  "store-url" => "./ilias.php?baseClass=ilcontainerblockpropertiesstorage&cmd=store" .
834  "&cont_block_id=itgr_" . $a_itgr['ref_id']
835  );
836  if (ilObjItemGroup::lookupHideTitle($a_itgr["obj_id"]) &&
837  !$this->getContainerGUI()->isActiveAdministrationPanel()) {
838  $this->renderer->addCustomBlock($a_itgr["ref_id"], "", $commands_html, $data);
839  } else {
840  $this->renderer->addCustomBlock($a_itgr["ref_id"], $a_itgr["title"], $commands_html, $data);
841  }
842 
843 
844  // render item group sub items
845 
847  $this->getContainerObject()->getId()
848  )->sortSubItems('itgr', $a_itgr['obj_id'], $items);
849 
850  // #18285
851  $items = ilContainer::getCompleteDescriptions($items);
852 
853  $position = 1;
854  foreach ($items as $item) {
855  // we are NOT using hasItem() here, because item might be in multiple item groups
856  $html2 = $this->renderItem($item, $position++, false, "[itgr][" . $a_itgr['obj_id'] . "]");
857  if ($html2 != "") {
858  // :TODO: show it multiple times?
859  $this->renderer->addItemToBlock($a_itgr["ref_id"], $item["type"], $item["child"], $html2, true);
860  }
861  }
862  }
863 }
static lookupHideTitle($a_id)
Lookup hide title.
determineAdminCommands($a_ref_id, $a_admin_com_included_in_list=false)
determin admin commands
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static getProperty($a_block_id, $a_user_id, $a_property)
Get property in session or db.
determinePageEmbeddedBlocks($a_container_page_html)
Determine all blocks that are embedded in the container page.
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
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.
static getCmdSide()
Get Column Side of Current Command.
static getItemsByEvent($a_event_id)
Get session material / event items.
getEmbeddedBlocks()
Get page embedded blocks.
$_SESSION["AccountId"]
$type
global $DIC
Definition: saml.php:7
$html2
Definition: 42richText.php:71
static initObjectListAction()
init js for background download
getItemGUI($item_data, $a_show_path=false)
Get ListGUI object for item.
static lookupBehaviour($a_id)
Lookup behaviour.
const IL_COL_RIGHT
getItemGroupsHTML($a_pos=0)
Get item groups HTML.
renderPageEmbeddedBlocks()
Render Page Embedded Blocks.
initRenderer()
Init container renderer.
__forwardToColumnGUI()
Get columngui output.
user()
Definition: user.php:4
insertPageEmbeddedBlocks($a_output_html)
Insert blocks into container page.
Parent class of all container content GUIs.
global $ilCtrl
Definition: ilias.php:18
getMainContent()
Get content HTML for main column, this one must be overwritten in derived classes.
const IL_SCREEN_FULL
getContainerGUI()
Get container GUI object.
Column user interface class.
getDetailsLevel($a_item_id)
get details level
static _lookupObjId($a_id)
special template class to simplify handling of ITX/PEAR
getContainerObject()
Get container object.
$ilUser
Definition: imgupload.php:18
renderItem($a_item_data, $a_position=0, $a_force_icon=false, $a_pos_prefix="")
Render an item.
static addListGUIActivationProperty(ilObjectListGUI $a_list_gui, array &$a_item)
Get timing details for list gui.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
clearAdminCommandsDetermination()
cleaer administration commands determination
renderItemGroup($a_itgr)
Render item group.
settings()
Definition: settings.php:2
static getScreenMode()
Get Screen Mode for current command.
static _getListGUIByType($a_type, $a_context=ilObjectListGUI::CONTEXT_REPOSITORY)
getCenterColumnHTML()
Get HTML for center column.
global $ilSetting
Definition: privfeed.php:17
global $ilDB
static getItemsByItemGroup($a_item_group_ref_id)
Get materials of item group.
static getLogger($a_component_id)
Get component logger.
static _getInstance($a_obj_id)
get instance by obj_id
__construct(&$container_gui_obj)
Constructor.
const IL_SCREEN_SIDE
Class ilContainerRenderer.
static getCompleteDescriptions(array $objects)
overwrites description fields to long or short description in an assoc array keys needed (obj_id and ...
addEmbeddedBlock($block_type, $block_parameter)
Add embedded block.
getRightColumnHTML()
Get HTML for right column.
$html
Definition: example_001.php:87
getGroupedObjTypes()
Get grouped repository object types.
const IL_COL_LEFT
setOutput()
Sets view output into column layout.