ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilColumnGUI Class Reference

Column user interface class. More...

+ Collaboration diagram for ilColumnGUI:

Public Member Functions

 __construct (string $a_col_type="", string $a_side="", bool $use_std_context=false)
 
 setColType (string $a_coltype)
 
 getColType ()
 
 setSide (string $a_side)
 
 getSide ()
 
 setEnableEdit (bool $a_enableedit)
 
 getEnableEdit ()
 
 setRepositoryMode (bool $a_repositorymode)
 
 getRepositoryMode ()
 
 setAdminCommands (bool $a_admincommands)
 
 getAdminCommands ()
 
 setBlockProperty (string $a_block_type, string $a_property, string $a_value)
 This function is supposed to be used for block type specific properties, that should be passed to ilBlockGUI->setProperty. More...
 
 getBlockProperties (string $a_block_type)
 
 setAllBlockProperties (array $a_block_properties)
 
 setRepositoryItems (array $a_repositoryitems)
 
 getRepositoryItems ()
 
 setItemPresentationManager (ItemPresentationManager $item_presentation)
 
 getItemPresentationManager ()
 
 hasItemPresentationManager ()
 
 executeCommand ()
 
 getHTML ()
 
 showBlocks ()
 
 updateBlock ()
 Update Block (asynchronous) More...
 
 activateBlock ()
 Activate hidden block. More...
 
 addBlock ()
 Add a block. More...
 
 determineBlocks ()
 Determine which blocks to show. More...
 
 setActionMenu (ilAdvancedSelectionListGUI $action_menu)
 
 getActionMenu ()
 

Static Public Member Functions

static addCustomBlockLocation (string $className, string $path)
 Adds location information of the custom block gui. More...
 
static addCustomBlockType (string $className, string $identifier)
 Adds the block type of the custom block gui. More...
 
static getCmdSide ()
 Get Column Side of Current Command. More...
 
static getScreenMode ()
 

Protected Member Functions

 isGloballyActivated (string $a_type)
 Check whether a block type is globally activated. More...
 
 exceededLimit (string $a_type)
 Check whether limit is not exceeded. More...
 

Protected Attributes

array $repositoryitems
 
string $coltype
 
ilDashboardSidePanelSettingsRepository $dash_side_panel_settings
 
ItemPresentationManager $item_presentation = null
 
ILIAS Block StandardGUIRequest $request
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilObjUser $user
 
ilTemplate $tpl
 
AgentDetermination $browser
 
ilSetting $settings
 
string $side = IL_COL_RIGHT
 
string $type
 
bool $enableedit = false
 
bool $repositorymode = false
 
array $blocks = []
 
array $rep_block_types = array("feed","poll")
 
array $block_property = array()
 
bool $admincommands = false
 
ilAdvancedSelectionListGUI $action_menu = null
 
array $default_blocks
 
array $custom_blocks
 
array $check_global_activation
 
array $check_nr_limit
 

Static Protected Attributes

static array $locations
 
static array $block_types
 

Detailed Description

Column user interface class.

This class is used on the personal desktop, the info screen class and witin container classes.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

ilColumnGUI: ilCalendarGUI ilColumnGUI:

Definition at line 41 of file class.ilColumnGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilColumnGUI::__construct ( string  $a_col_type = "",
string  $a_side = "",
bool  $use_std_context = false 
)

Definition at line 166 of file class.ilColumnGUI.php.

References $DIC, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), setColType(), setSide(), ILIAS\Repository\settings(), and ILIAS\Repository\user().

170  {
171  global $DIC;
172 
173  $this->ctrl = $DIC->ctrl();
174  $this->lng = $DIC->language();
175  $this->user = $DIC->user();
176  $this->browser = $DIC->http()->agent();
177  $this->settings = $DIC->settings();
178  $this->setColType($a_col_type);
179  $this->setSide($a_side);
180 
181  $block_service = new ILIAS\Block\Service($DIC);
182  $this->request = $block_service->internal()
183  ->gui()
184  ->standardRequest();
185 
186  $this->dash_side_panel_settings = new ilDashboardSidePanelSettingsRepository();
187  }
setSide(string $a_side)
global $DIC
Definition: feed.php:28
setColType(string $a_coltype)
+ Here is the call graph for this function:

Member Function Documentation

◆ activateBlock()

ilColumnGUI::activateBlock ( )

Activate hidden block.

Definition at line 521 of file class.ilColumnGUI.php.

References $ctrl, $user, ilBlockSetting\_writeDetailLevel(), and ILIAS\Repository\int().

521  : void
522  {
523  $ilUser = $this->user;
524  $ilCtrl = $this->ctrl;
525 
526  if ($this->request->getBlock() != "") {
527  $block = explode("_", $this->request->getBlock());
528  ilBlockSetting::_writeDetailLevel($block[0], "2", $ilUser->getId(), (int) $block[1]);
529  }
530 
531  $ilCtrl->returnToParent($this);
532  }
static _writeDetailLevel(string $a_type, string $a_value, int $a_user=0, int $a_block_id=0)
+ Here is the call graph for this function:

◆ addBlock()

ilColumnGUI::addBlock ( )

Add a block.

Definition at line 537 of file class.ilColumnGUI.php.

References $ctrl, getAdminCommands(), getEnableEdit(), getRepositoryMode(), and ilCtrl\setCmdClass().

537  : string
538  {
539  $ilCtrl = $this->ctrl;
540 
541  $class = array_search($this->request->getBlockType(), self::$block_types);
542 
543  $ilCtrl->setCmdClass($class);
544  $ilCtrl->setCmd("create");
545  $block_gui = new $class();
546  $block_gui->setProperties($this->block_property[$this->request->getBlockType()]);
547  $block_gui->setRepositoryMode($this->getRepositoryMode());
548  $block_gui->setEnableEdit($this->getEnableEdit());
549  $block_gui->setAdminCommands($this->getAdminCommands());
550 
551  $ilCtrl->setParameter($this, "block_type", $this->request->getBlockType());
552  $html = $ilCtrl->forwardCommand($block_gui);
553  $ilCtrl->setParameter($this, "block_type", "");
554  return $html;
555  }
setCmdClass($a_cmd_class)
+ Here is the call graph for this function:

◆ addCustomBlockLocation()

static ilColumnGUI::addCustomBlockLocation ( string  $className,
string  $path 
)
static

Adds location information of the custom block gui.

Definition at line 192 of file class.ilColumnGUI.php.

References $path.

195  : void {
196  self::$locations[$className] = $path;
197  }
$path
Definition: ltiservices.php:32

◆ addCustomBlockType()

static ilColumnGUI::addCustomBlockType ( string  $className,
string  $identifier 
)
static

Adds the block type of the custom block gui.

Parameters
string$classNameThe name of the custom block gui class
string$identifierThe identifier (block type) of the custom block gui

Definition at line 204 of file class.ilColumnGUI.php.

207  : void {
208  self::$block_types[$className] = $identifier;
209  }

◆ determineBlocks()

ilColumnGUI::determineBlocks ( )

Determine which blocks to show.

Definition at line 560 of file class.ilColumnGUI.php.

References $ctrl, $side, $user, ilBlockSetting\_lookupSide(), getColType(), getItemPresentationManager(), getRepositoryMode(), hasItemPresentationManager(), IL_COL_CENTER, IL_COL_LEFT, IL_COL_RIGHT, isGloballyActivated(), and ilArrayUtil\sortArray().

Referenced by getHTML(), and updateBlock().

560  : void
561  {
562  $ilUser = $this->user;
563  $ilCtrl = $this->ctrl;
564 
565  $this->blocks[IL_COL_LEFT] = array();
566  $this->blocks[IL_COL_RIGHT] = array();
567  $this->blocks[IL_COL_CENTER] = array();
568 
569  $user_id = 0;
570  if ($this->getColType() === 'pd') {
571  $user_id = $ilUser->getId();
572  $positions = array_flip($this->dash_side_panel_settings->getPositions());
573  }
574 
575  $def_nr = 1000;
576  if (isset($this->default_blocks[$this->getColType()])) {
577  foreach ($this->default_blocks[$this->getColType()] as $class => $def_side) {
578  $type = self::$block_types[$class];
579  if ($this->isGloballyActivated($type)) {
580  $nr = $def_nr++;
581 
582  // extra handling for system messages, feedback block and news
583  if ($type == "news") { // always show news first
584  $nr = -15;
585  }
586  if ($type == "cal") {
587  $nr = -8;
588  }
589  if ($type == "chcal") { // consultation hours always directly below calendar
590  $nr = -7;
591  }
592  if ($type == "pdfeedb") { // always show feedback request second
593  $nr = -10;
594  }
595  if ($type == "clsfct") { // mkunkel wants to have this on top
596  $nr = -16;
597  }
599  if (is_null($side) || $side === "") {
600  $side = $def_side;
601  }
602  if ($side == IL_COL_LEFT) {
604  }
605 
606  if ($this->getColType() === 'pd' && in_array(substr($type, 2), $this->dash_side_panel_settings->getValidModules(), true)) {
607  $nr = $positions[substr($type, 2)] ?? $nr;
608  }
609 
610  $this->blocks[$side][] = array(
611  "nr" => $nr,
612  "class" => $class,
613  "type" => $type,
614  "id" => 0,
615  "custom" => false);
616  }
617  }
618  }
619 
620  if (!$this->getRepositoryMode()) {
621  $custom_block = new ilCustomBlock();
622  $custom_block->setContextObjId($ilCtrl->getContextObjId());
623  $custom_block->setContextObjType($ilCtrl->getContextObjType());
624  $c_blocks = $custom_block->queryBlocksForContext();
625 
626  foreach ($c_blocks as $c_block) {
627  $type = $c_block["type"];
628 
629  if ($this->isGloballyActivated($type)) {
630  $class = array_search($type, self::$block_types);
631  $nr = $def_nr++;
632  $side = ilBlockSetting::_lookupSide($type, $user_id, $c_block["id"]);
633  if (is_null($side)) {
635  }
636 
637  $this->blocks[$side][] = array(
638  "nr" => $nr,
639  "class" => $class,
640  "type" => $type,
641  "id" => $c_block["id"],
642  "custom" => true);
643  }
644  }
645  } else { // get all subitems
646  foreach ($this->rep_block_types as $block_type) {
647  if ($this->isGloballyActivated($block_type) && $this->hasItemPresentationManager()) {
648  $item_ref_ids = $this->getItemPresentationManager()->getRefIdsOfType($block_type);
649  foreach ($item_ref_ids as $item_ref_id) {
650  $item = $this->getItemPresentationManager()->getRawDataByRefId($item_ref_id);
651  $costum_block = new ilCustomBlock();
652  $costum_block->setContextObjId((int) $item["obj_id"]);
653  $costum_block->setContextObjType($block_type);
654  $c_blocks = $costum_block->queryBlocksForContext();
655  $c_block = $c_blocks[0];
656 
657  $type = $block_type;
658  $class = array_search($type, self::$block_types);
659  $nr = $def_nr++;
660  $side = ilBlockSetting::_lookupSide($type, $user_id, (int) $c_block["id"]);
661  if ($side == false) {
663  }
664 
665  $this->blocks[$side][] = array(
666  "nr" => $nr,
667  "class" => $class,
668  "type" => $type,
669  "id" => $c_block["id"],
670  "custom" => true,
671  "ref_id" => $item["ref_id"]);
672  }
673  }
674  }
675 
676  // repository object custom blocks
677  $custom_block = new ilCustomBlock();
678  $custom_block->setContextObjId($ilCtrl->getContextObjId());
679  $custom_block->setContextObjType($ilCtrl->getContextObjType());
680  $c_blocks = $custom_block->queryBlocksForContext(false); // get all sub-object types
681  foreach ($c_blocks as $c_block) {
682  $type = $c_block["type"];
683  $class = array_search($type, self::$block_types);
684 
685  if ($class) {
686  $nr = $def_nr++;
688 
689  $this->blocks[$side][] = array(
690  "nr" => $nr,
691  "class" => $class,
692  "type" => $type,
693  "id" => $c_block["id"],
694  "custom" => true);
695  }
696  }
697  }
698 
699  $this->blocks[IL_COL_LEFT] =
700  ilArrayUtil::sortArray($this->blocks[IL_COL_LEFT], "nr", "asc", true);
701  $this->blocks[IL_COL_RIGHT] =
702  ilArrayUtil::sortArray($this->blocks[IL_COL_RIGHT], "nr", "asc", true);
703  $this->blocks[IL_COL_CENTER] =
704  ilArrayUtil::sortArray($this->blocks[IL_COL_CENTER], "nr", "asc", true);
705  }
const IL_COL_CENTER
const IL_COL_RIGHT
isGloballyActivated(string $a_type)
Check whether a block type is globally activated.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupSide(string $a_type, int $a_user=0, int $a_block_id=0)
Lookup side.
const IL_COL_LEFT
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ exceededLimit()

ilColumnGUI::exceededLimit ( string  $a_type)
protected

Check whether limit is not exceeded.

Definition at line 770 of file class.ilColumnGUI.php.

References $ctrl, $ilSetting, $res, $settings, getRepositoryMode(), and ILIAS\Repository\int().

772  : bool {
774  $ilCtrl = $this->ctrl;
775 
776  if ($this->check_nr_limit[$a_type]) {
777  if (!$this->getRepositoryMode()) {
778  $costum_block = new ilCustomBlock();
779  $costum_block->setContextObjId($ilCtrl->getContextObjId());
780  $costum_block->setContextObjType($ilCtrl->getContextObjType());
781  $costum_block->setType($a_type);
782  $res = $costum_block->queryCntBlockForContext();
783  $cnt = (int) $res[0]["cnt"];
784  } else {
785  return false; // not implemented for repository yet
786  }
787 
788 
789  if ($ilSetting->get("block_limit_" . $a_type) > $cnt) {
790  return false;
791  } else {
792  return true;
793  }
794  }
795  return false;
796  }
$res
Definition: ltiservices.php:69
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $ilSetting
Definition: privfeed.php:18
ilSetting $settings
+ Here is the call graph for this function:

◆ executeCommand()

ilColumnGUI::executeCommand ( )

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

References $ctrl, getAdminCommands(), getColType(), getEnableEdit(), getRepositoryMode(), getSide(), and ilCtrl\setParameter().

360  : string
361  {
362  $ilCtrl = $this->ctrl;
363 
364  $ilCtrl->setParameter($this, "col_side", $this->getSide());
365 
366  $next_class = $ilCtrl->getNextClass();
367  $cmd = $ilCtrl->getCmd("getHTML");
368 
369  $cur_block_type = $this->request->getBlockType();
370 
371  if ($next_class != "") {
372  // forward to block
373  if ($gui_class = array_search($cur_block_type, self::$block_types)) {
374  $ilCtrl->setParameter($this, "block_type", $cur_block_type);
375  $block_gui = new $gui_class();
376  $block_gui->setProperties($this->block_property[$cur_block_type] ?? []);
377  $block_gui->setRepositoryMode($this->getRepositoryMode());
378  $block_gui->setEnableEdit($this->getEnableEdit());
379  $block_gui->setAdminCommands($this->getAdminCommands());
380 
381  if (in_array($gui_class, $this->custom_blocks[$this->getColType()]) ||
382  in_array($cur_block_type, $this->rep_block_types)) {
383  $block_class = substr($gui_class, 0, strlen($gui_class) - 3);
384  $app_block = new $block_class($this->request->getBlockId());
385  $block_gui->setBlock($app_block);
386  }
387  $html = $ilCtrl->forwardCommand($block_gui);
388  $ilCtrl->setParameter($this, "block_type", "");
389 
390  return $html;
391  }
392  } else {
393  return (string) $this->$cmd();
394  }
395  return "";
396  }
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
+ Here is the call graph for this function:

◆ getActionMenu()

ilColumnGUI::getActionMenu ( )

Definition at line 804 of file class.ilColumnGUI.php.

References $action_menu.

805  {
806  return $this->action_menu;
807  }
ilAdvancedSelectionListGUI $action_menu
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ getAdminCommands()

ilColumnGUI::getAdminCommands ( )

Definition at line 277 of file class.ilColumnGUI.php.

References $admincommands.

Referenced by addBlock(), executeCommand(), showBlocks(), and updateBlock().

277  : bool
278  {
279  return $this->admincommands;
280  }
+ Here is the caller graph for this function:

◆ getBlockProperties()

ilColumnGUI::getBlockProperties ( string  $a_block_type)

Definition at line 321 of file class.ilColumnGUI.php.

323  : array {
324  return $this->block_property[$a_block_type];
325  }

◆ getCmdSide()

static ilColumnGUI::getCmdSide ( )
static

Get Column Side of Current Command.

Definition at line 214 of file class.ilColumnGUI.php.

References $DIC.

Referenced by ilContainerContentGUI\forwardToColumnGUI(), and ilObjectGUI\getCenterColumnHTML().

214  : ?string
215  {
216  global $DIC;
217 
218  $block_service = new ILIAS\Block\Service($DIC);
219  $request = $block_service->internal()
220  ->gui()
221  ->standardRequest();
222  return $request->getColSide();
223  }
global $DIC
Definition: feed.php:28
ILIAS Block StandardGUIRequest $request
+ Here is the caller graph for this function:

◆ getColType()

ilColumnGUI::getColType ( )

Definition at line 233 of file class.ilColumnGUI.php.

References $coltype.

Referenced by determineBlocks(), and executeCommand().

233  : string
234  {
235  return $this->coltype;
236  }
+ Here is the caller graph for this function:

◆ getEnableEdit()

ilColumnGUI::getEnableEdit ( )

Definition at line 256 of file class.ilColumnGUI.php.

References $enableedit.

Referenced by addBlock(), executeCommand(), showBlocks(), and updateBlock().

256  : bool
257  {
258  return $this->enableedit;
259  }
+ Here is the caller graph for this function:

◆ getHTML()

ilColumnGUI::getHTML ( )

Definition at line 398 of file class.ilColumnGUI.php.

References $ctrl, determineBlocks(), getSide(), ilCtrl\setParameter(), and showBlocks().

398  : string
399  {
400  $ilCtrl = $this->ctrl;
401 
402  $ilCtrl->setParameter($this, "col_side", $this->getSide());
403 
404  $this->tpl = new ilTemplate("tpl.column.html", true, true, "Services/Block");
405  $this->determineBlocks();
406  $this->showBlocks();
407  return $this->tpl->get();
408  }
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
determineBlocks()
Determine which blocks to show.
+ Here is the call graph for this function:

◆ getItemPresentationManager()

ilColumnGUI::getItemPresentationManager ( )

Definition at line 350 of file class.ilColumnGUI.php.

References $item_presentation.

Referenced by determineBlocks().

351  {
353  }
ItemPresentationManager $item_presentation
+ Here is the caller graph for this function:

◆ getRepositoryItems()

ilColumnGUI::getRepositoryItems ( )

Definition at line 339 of file class.ilColumnGUI.php.

References $repositoryitems.

339  : array
340  {
341  return $this->repositoryitems;
342  }

◆ getRepositoryMode()

ilColumnGUI::getRepositoryMode ( )

Definition at line 267 of file class.ilColumnGUI.php.

References $repositorymode.

Referenced by addBlock(), determineBlocks(), exceededLimit(), executeCommand(), showBlocks(), and updateBlock().

267  : bool
268  {
269  return $this->repositorymode;
270  }
+ Here is the caller graph for this function:

◆ getScreenMode()

static ilColumnGUI::getScreenMode ( )
static

Definition at line 282 of file class.ilColumnGUI.php.

References $DIC, IL_SCREEN_CENTER, and IL_SCREEN_SIDE.

Referenced by ilContainerContentGUI\forwardToColumnGUI(), and ilObjectGUI\getCenterColumnHTML().

282  : string
283  {
284  global $DIC;
285 
286  $ilCtrl = $DIC->ctrl();
287 
288  $block_service = new ILIAS\Block\Service($DIC);
289  $request = $block_service->internal()
290  ->gui()
291  ->standardRequest();
292 
293  if ($ilCtrl->getCmdClass() == "ilcolumngui") {
294  switch ($ilCtrl->getCmd()) {
295  case "addBlock":
296  return IL_SCREEN_CENTER;
297  }
298  }
299 
300  $cur_block_type = $request->getBlockType();
301 
302  if ($class = array_search($cur_block_type, self::$block_types)) {
303  return call_user_func(array($class, 'getScreenMode'));
304  }
305 
306  return IL_SCREEN_SIDE;
307  }
global $DIC
Definition: feed.php:28
const IL_SCREEN_CENTER
const IL_SCREEN_SIDE
ILIAS Block StandardGUIRequest $request
+ Here is the caller graph for this function:

◆ getSide()

ilColumnGUI::getSide ( )

Definition at line 246 of file class.ilColumnGUI.php.

References $side.

Referenced by executeCommand(), getHTML(), showBlocks(), and updateBlock().

246  : string
247  {
248  return $this->side;
249  }
+ Here is the caller graph for this function:

◆ hasItemPresentationManager()

ilColumnGUI::hasItemPresentationManager ( )

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

Referenced by determineBlocks().

355  : bool
356  {
357  return isset($this->item_presentation);
358  }
+ Here is the caller graph for this function:

◆ isGloballyActivated()

ilColumnGUI::isGloballyActivated ( string  $a_type)
protected

Check whether a block type is globally activated.

Definition at line 710 of file class.ilColumnGUI.php.

References $ctrl, $GLOBALS, $ilSetting, $settings, ilCalendarSettings\_getInstance(), ilContainer\_lookupContainerSetting(), ilDashboardSidePanelSettingsRepository\CALENDAR, ilCalendarSettings\lookupCalendarContentPresentationEnabled(), ilDashboardSidePanelSettingsRepository\MAIL, ilDashboardSidePanelSettingsRepository\NEWS, ilDashboardSidePanelSettingsRepository\TASKS, and ilObjectServiceSettingsGUI\USE_NEWS.

Referenced by determineBlocks().

712  : bool {
714  $ilCtrl = $this->ctrl;
715 
716  if ($a_type == 'pdfeed') {
717  return false;
718  }
719 
720  if (isset($this->check_global_activation[$a_type]) && $this->check_global_activation[$a_type]) {
721  if ($a_type === 'pd' . ilDashboardSidePanelSettingsRepository::NEWS) {
722  return ($this->dash_side_panel_settings->isEnabled($this->dash_side_panel_settings::NEWS) &&
723  $ilSetting->get('block_activated_news'));
724  } elseif ($a_type === 'pd' . ilDashboardSidePanelSettingsRepository::MAIL) {
725  return $this->dash_side_panel_settings->isEnabled($this->dash_side_panel_settings::MAIL);
726  } elseif ($a_type === 'pd' . ilDashboardSidePanelSettingsRepository::TASKS) {
727  return $this->dash_side_panel_settings->isEnabled($this->dash_side_panel_settings::TASKS);
728  } elseif ($a_type == 'news') {
729  return
730  $ilSetting->get('block_activated_news') &&
731 
732  (!in_array($ilCtrl->getContextObjType(), ["grp", "crs"]) ||
734  $GLOBALS['ilCtrl']->getContextObjId(),
736  "1"
737  )) &&
739  $GLOBALS['ilCtrl']->getContextObjId(),
740  'cont_show_news',
741  "1"
742  );
743  } elseif ($ilSetting->get("block_activated_" . $a_type)) {
744  return true;
745  } elseif ($a_type == 'cal' || $a_type == 'chcal') {
746  return ilCalendarSettings::lookupCalendarContentPresentationEnabled($ilCtrl->getContextObjId());
747  } elseif ($a_type === 'pd' . ilDashboardSidePanelSettingsRepository::CALENDAR) {
748  if (!$this->dash_side_panel_settings->isEnabled($this->dash_side_panel_settings::CALENDAR)) {
749  return false;
750  }
751  return ilCalendarSettings::_getInstance()->isEnabled();
752  } elseif ($a_type == "tagcld") {
753  $tags_active = new ilSetting("tags");
754  return (bool) $tags_active->get("enable", "0");
755  } elseif ($a_type == "clsfct") {
756  if ($ilCtrl->getContextObjType() == "cat") { // taxonomy presentation in classification block
757  return true;
758  }
759  $tags_active = new ilSetting("tags"); // tags presentation in classification block
760  return (bool) $tags_active->get("enable", "0");
761  }
762  return false;
763  }
764  return true;
765  }
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
$GLOBALS["DIC"]
Definition: wac.php:31
static lookupCalendarContentPresentationEnabled(int $obj_id)
global $ilSetting
Definition: privfeed.php:18
ilSetting $settings
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setActionMenu()

ilColumnGUI::setActionMenu ( ilAdvancedSelectionListGUI  $action_menu)

Definition at line 798 of file class.ilColumnGUI.php.

References $action_menu.

800  : void {
801  $this->action_menu = $action_menu;
802  }
ilAdvancedSelectionListGUI $action_menu

◆ setAdminCommands()

ilColumnGUI::setAdminCommands ( bool  $a_admincommands)

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

Referenced by ilContainerGUI\setColumnSettings().

272  : void
273  {
274  $this->admincommands = $a_admincommands;
275  }
+ Here is the caller graph for this function:

◆ setAllBlockProperties()

ilColumnGUI::setAllBlockProperties ( array  $a_block_properties)

Definition at line 327 of file class.ilColumnGUI.php.

Referenced by ilInfoScreenGUI\setColumnSettings().

329  : void {
330  $this->block_property = $a_block_properties;
331  }
+ Here is the caller graph for this function:

◆ setBlockProperty()

ilColumnGUI::setBlockProperty ( string  $a_block_type,
string  $a_property,
string  $a_value 
)

This function is supposed to be used for block type specific properties, that should be passed to ilBlockGUI->setProperty.

Definition at line 313 of file class.ilColumnGUI.php.

Referenced by ilContainerGUI\setColumnSettings(), and ilObjForumGUI\setColumnSettings().

317  : void {
318  $this->block_property[$a_block_type][$a_property] = $a_value;
319  }
+ Here is the caller graph for this function:

◆ setColType()

ilColumnGUI::setColType ( string  $a_coltype)
Parameters
string$a_coltypeColumn Type

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

Referenced by __construct().

228  : void
229  {
230  $this->coltype = $a_coltype;
231  }
+ Here is the caller graph for this function:

◆ setEnableEdit()

ilColumnGUI::setEnableEdit ( bool  $a_enableedit)

Definition at line 251 of file class.ilColumnGUI.php.

Referenced by ilInfoScreenGUI\setColumnSettings(), and ilObjectGUI\setColumnSettings().

251  : void
252  {
253  $this->enableedit = $a_enableedit;
254  }
+ Here is the caller graph for this function:

◆ setItemPresentationManager()

ilColumnGUI::setItemPresentationManager ( ItemPresentationManager  $item_presentation)

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

References $item_presentation.

Referenced by ilContainerGUI\setColumnSettings().

346  : void {
347  $this->item_presentation = $item_presentation;
348  }
ItemPresentationManager $item_presentation
+ Here is the caller graph for this function:

◆ setRepositoryItems()

ilColumnGUI::setRepositoryItems ( array  $a_repositoryitems)

Definition at line 333 of file class.ilColumnGUI.php.

335  : void {
336  $this->repositoryitems = $a_repositoryitems;
337  }

◆ setRepositoryMode()

ilColumnGUI::setRepositoryMode ( bool  $a_repositorymode)

Definition at line 261 of file class.ilColumnGUI.php.

Referenced by ilInfoScreenGUI\setColumnSettings(), ilObjectGUI\setColumnSettings(), and ilObjForumGUI\setColumnSettings().

263  : void {
264  $this->repositorymode = $a_repositorymode;
265  }
+ Here is the caller graph for this function:

◆ setSide()

ilColumnGUI::setSide ( string  $a_side)
Parameters
string$a_sideSide IL_COL_LEFT | IL_COL_RIGHT

Definition at line 241 of file class.ilColumnGUI.php.

Referenced by __construct().

241  : void
242  {
243  $this->side = $a_side;
244  }
+ Here is the caller graph for this function:

◆ showBlocks()

ilColumnGUI::showBlocks ( )

Definition at line 410 of file class.ilColumnGUI.php.

References $ctrl, $path, $user, getAdminCommands(), getEnableEdit(), getRepositoryMode(), and getSide().

Referenced by getHTML().

410  : void
411  {
412  $ilCtrl = $this->ctrl;
413  $ilUser = $this->user;
414 
415  $i = 1;
416  $sum_moveable = count($this->blocks[$this->getSide()]);
417 
418  foreach ($this->blocks[$this->getSide()] as $block) {
419  $gui_class = $block["class"] ?? null;
420  if (!is_string($gui_class)) {
421  continue;
422  }
423  $block_class = substr($gui_class, 0, strlen($gui_class) - 3);
424 
425  // get block gui class
426  $block_gui = new $gui_class();
427  if (isset($this->block_property[$block["type"]])) {
428  $block_gui->setProperties($this->block_property[$block["type"]]);
429  }
430  $block_gui->setRepositoryMode($this->getRepositoryMode());
431  $block_gui->setEnableEdit($this->getEnableEdit());
432  $block_gui->setAdminCommands($this->getAdminCommands());
433 
434  // get block for custom blocks
435  if ($block["custom"]) {
436  $path = "./" . self::$locations[$gui_class] . "classes/" .
437  "class." . $block_class . ".php";
438  if (file_exists($path)) {
439  $app_block = new $block_class((int) $block["id"]);
440  } else {
441  // we only need generic block
442  $app_block = new ilCustomBlock((int) $block["id"]);
443  }
444  $block_gui->setBlock($app_block);
445  if (isset($block["ref_id"])) {
446  $block_gui->setRefId((int) $block["ref_id"]);
447  }
448  }
449 
450  $ilCtrl->setParameter($this, "block_type", $block_gui->getBlockType());
451  $this->tpl->setCurrentBlock("col_block");
452 
453  $html = $ilCtrl->getHTML($block_gui);
454 
455  // don't render a block if it's empty
456  if ($html != "") {
457  $this->tpl->setVariable("BLOCK", $html);
458  $this->tpl->parseCurrentBlock();
459  $ilCtrl->setParameter($this, "block_type", "");
460  }
461  }
462  }
$path
Definition: ltiservices.php:32
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateBlock()

ilColumnGUI::updateBlock ( )

Update Block (asynchronous)

Definition at line 468 of file class.ilColumnGUI.php.

References $ctrl, determineBlocks(), exit, getAdminCommands(), getEnableEdit(), getRepositoryMode(), and getSide().

468  : void
469  {
470  $ilCtrl = $this->ctrl;
471 
472  $this->determineBlocks();
473  $i = 1;
474  $sum_moveable = count($this->blocks[$this->getSide()]);
475 
476  foreach ($this->blocks[$this->getSide()] as $block) {
477  // set block id to context obj id,
478  // if block is not a custom block and context is not personal desktop
479  if (!$block["custom"] && $ilCtrl->getContextObjType() != "" && $ilCtrl->getContextObjType() != "user") {
480  $block["id"] = $ilCtrl->getContextObjId();
481  }
482 
483  if ($this->request->getBlockId() == "block_" . $block["type"] . "_" . $block["id"]) {
484  $gui_class = $block["class"];
485  $block_class = substr($block["class"], 0, strlen($block["class"]) - 3);
486 
487  $block_gui = new $gui_class();
488  $block_gui->setProperties($this->block_property[$block["type"]]);
489  $block_gui->setRepositoryMode($this->getRepositoryMode());
490  $block_gui->setEnableEdit($this->getEnableEdit());
491  $block_gui->setAdminCommands($this->getAdminCommands());
492 
493  // get block for custom blocks
494  if ($block["custom"]) {
495  $app_block = new $block_class($block["id"]);
496  $block_gui->setBlock($app_block);
497  $block_gui->setRefId($block["ref_id"]);
498  }
499 
500  $ilCtrl->setParameter($this, "block_type", $block["type"]);
501  echo $ilCtrl->getHTML($block_gui);
502  exit;
503  }
504 
505  // count (moveable) blocks
506  if ($block["type"] != "pdfeedb"
507  && $block["type"] != "news") {
508  $i++;
509  } else {
510  $sum_moveable--;
511  }
512  }
513  echo "Error: ilColumnGUI::updateBlock: Block '" .
514  $this->request->getBlockId() . "' unknown.";
515  exit;
516  }
exit
Definition: login.php:29
determineBlocks()
Determine which blocks to show.
+ Here is the call graph for this function:

Field Documentation

◆ $action_menu

ilAdvancedSelectionListGUI ilColumnGUI::$action_menu = null
protected

Definition at line 66 of file class.ilColumnGUI.php.

Referenced by getActionMenu(), and setActionMenu().

◆ $admincommands

bool ilColumnGUI::$admincommands = false
protected

Definition at line 65 of file class.ilColumnGUI.php.

Referenced by getAdminCommands().

◆ $block_property

array ilColumnGUI::$block_property = array()
protected

Definition at line 64 of file class.ilColumnGUI.php.

◆ $block_types

array ilColumnGUI::$block_types
staticprotected
Initial value:
= array(
"ilPDMailBlockGUI" => 'pd' . ilDashboardSidePanelSettingsRepository::MAIL,
"ilPDTasksBlockGUI" => 'pd' . ilDashboardSidePanelSettingsRepository::TASKS,
"ilPDNewsBlockGUI" => 'pd' . ilDashboardSidePanelSettingsRepository::NEWS,
"ilNewsForContextBlockGUI" => "news",
"ilCalendarBlockGUI" => "cal",
"ilPDCalendarBlockGUI" => 'pd' . ilDashboardSidePanelSettingsRepository::CALENDAR,
"ilConsultationHoursCalendarBlockGUI" => "chcal",
"ilSelectedItemsBlockGUI" => "pditems",
'ilPollBlockGUI' => 'poll',
'ilClassificationBlockGUI' => 'clsfct',
"ilPDStudyProgrammeSimpleListGUI" => "prgsimplelist",
"ilPDStudyProgrammeExpandableListGUI" => "prgexpandablelist",
)

Definition at line 88 of file class.ilColumnGUI.php.

◆ $blocks

array ilColumnGUI::$blocks = []
protected

Definition at line 59 of file class.ilColumnGUI.php.

◆ $browser

AgentDetermination ilColumnGUI::$browser
protected

Definition at line 52 of file class.ilColumnGUI.php.

◆ $check_global_activation

array ilColumnGUI::$check_global_activation
protected
Initial value:
=
array("news" => true,
"cal" => true,
"chcal" => true,
"pdtag" => true,
"tagcld" => true,
"clsfct" => true)

Definition at line 151 of file class.ilColumnGUI.php.

◆ $check_nr_limit

array ilColumnGUI::$check_nr_limit
protected
Initial value:
=
array("pdfeed" => true)

Definition at line 163 of file class.ilColumnGUI.php.

◆ $coltype

string ilColumnGUI::$coltype
protected

Definition at line 44 of file class.ilColumnGUI.php.

Referenced by getColType().

◆ $ctrl

◆ $custom_blocks

array ilColumnGUI::$custom_blocks
protected
Initial value:
= array(
"cat" => array(),
"crs" => array(),
"grp" => array(),
"frm" => array(),
"root" => array(),
"info" => array(),
"fold" => array(),
"pd" => array()
)

Definition at line 138 of file class.ilColumnGUI.php.

◆ $dash_side_panel_settings

ilDashboardSidePanelSettingsRepository ilColumnGUI::$dash_side_panel_settings
protected

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

◆ $default_blocks

array ilColumnGUI::$default_blocks
protected

Definition at line 104 of file class.ilColumnGUI.php.

◆ $enableedit

bool ilColumnGUI::$enableedit = false
protected

Definition at line 57 of file class.ilColumnGUI.php.

Referenced by getEnableEdit().

◆ $item_presentation

ItemPresentationManager ilColumnGUI::$item_presentation = null
protected

Definition at line 46 of file class.ilColumnGUI.php.

Referenced by getItemPresentationManager(), and setItemPresentationManager().

◆ $lng

ilLanguage ilColumnGUI::$lng
protected

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

◆ $locations

array ilColumnGUI::$locations
staticprotected
Initial value:
= array(
"ilNewsForContextBlockGUI" => "Services/News/",
"ilCalendarBlockGUI" => "Services/Calendar/",
"ilPDCalendarBlockGUI" => "Services/Calendar/",
"ilConsultationHoursCalendarBlockGUI" => "Services/Calendar/",
"ilPDTasksBlockGUI" => "Services/Tasks/",
"ilPDMailBlockGUI" => "Services/Mail/",
"ilSelectedItemsBlockGUI" => "Services/Dashboard/Block/",
"ilPDNewsBlockGUI" => "Services/News/",
'ilPollBlockGUI' => 'Modules/Poll/',
'ilClassificationBlockGUI' => 'Services/Classification/',
"ilPDStudyProgrammeSimpleListGUI" => "Modules/StudyProgramme/",
"ilPDStudyProgrammeExpandableListGUI" => "Modules/StudyProgramme/",
)

Definition at line 73 of file class.ilColumnGUI.php.

◆ $rep_block_types

array ilColumnGUI::$rep_block_types = array("feed","poll")
protected

Definition at line 62 of file class.ilColumnGUI.php.

◆ $repositoryitems

array ilColumnGUI::$repositoryitems
protected

Definition at line 43 of file class.ilColumnGUI.php.

Referenced by getRepositoryItems().

◆ $repositorymode

bool ilColumnGUI::$repositorymode = false
protected

Definition at line 58 of file class.ilColumnGUI.php.

Referenced by getRepositoryMode().

◆ $request

ILIAS Block StandardGUIRequest ilColumnGUI::$request
protected

Definition at line 47 of file class.ilColumnGUI.php.

◆ $settings

ilSetting ilColumnGUI::$settings
protected

Definition at line 53 of file class.ilColumnGUI.php.

Referenced by exceededLimit(), and isGloballyActivated().

◆ $side

string ilColumnGUI::$side = IL_COL_RIGHT
protected

Definition at line 55 of file class.ilColumnGUI.php.

Referenced by determineBlocks(), and getSide().

◆ $tpl

ilTemplate ilColumnGUI::$tpl
protected

Definition at line 51 of file class.ilColumnGUI.php.

◆ $type

string ilColumnGUI::$type
protected

Definition at line 56 of file class.ilColumnGUI.php.

◆ $user

ilObjUser ilColumnGUI::$user
protected

Definition at line 50 of file class.ilColumnGUI.php.

Referenced by activateBlock(), determineBlocks(), and showBlocks().


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