ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
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...
 
 determineBlocks ()
 Determine which blocks to show. More...
 

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 Container 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
 
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

@ilCtrl_IsCalledBy ilColumnGUI: ilCalendarGUI @ilCtrl_Calls ilColumnGUI:

Definition at line 42 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 178 of file class.ilColumnGUI.php.

182 {
183 global $DIC;
184
185 $this->ctrl = $DIC->ctrl();
186 $this->lng = $DIC->language();
187 $this->user = $DIC->user();
188 $this->browser = $DIC->http()->agent();
189 $this->settings = $DIC->settings();
190 $this->setColType($a_col_type);
191 $this->setSide($a_side);
192
193 $block_service = new ILIAS\Container\Block\Service($DIC);
194 $this->request = $block_service->internal()
195 ->gui()
196 ->standardRequest();
197
198 $this->dash_side_panel_settings = new ilDashboardSidePanelSettingsRepository();
199 }
setColType(string $a_coltype)
setSide(string $a_side)
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ activateBlock()

ilColumnGUI::activateBlock ( )

Activate hidden block.

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

533 : void
534 {
535 $ilUser = $this->user;
536 $ilCtrl = $this->ctrl;
537
538 if ($this->request->getBlock() != "") {
539 $block = explode("_", $this->request->getBlock());
540 ilBlockSetting::_writeDetailLevel($block[0], "2", $ilUser->getId(), (int) $block[1]);
541 }
542
543 $ilCtrl->returnToParent($this);
544 }
static _writeDetailLevel(string $a_type, string $a_value, int $a_user=0, int $a_block_id=0)

References ilBlockSetting\_writeDetailLevel().

+ 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 204 of file class.ilColumnGUI.php.

207 : void {
208 self::$locations[$className] = $path;
209 }
$path
Definition: ltiservices.php:30

◆ 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 216 of file class.ilColumnGUI.php.

219 : void {
220 self::$block_types[$className] = $identifier;
221 }

◆ determineBlocks()

ilColumnGUI::determineBlocks ( )

Determine which blocks to show.

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

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

References $user_id, ilBlockSetting\_lookupSide(), IL_COL_CENTER, IL_COL_LEFT, IL_COL_RIGHT, and ilArrayUtil\sortArray().

+ Here is the call graph for this function:

◆ exceededLimit()

ilColumnGUI::exceededLimit ( string  $a_type)
protected

Check whether limit is not exceeded.

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

777 : bool {
779 $ilCtrl = $this->ctrl;
780
781 if ($this->check_nr_limit[$a_type]) {
782 if (!$this->getRepositoryMode()) {
783 $costum_block = new ilCustomBlock();
784 $costum_block->setContextObjId($ilCtrl->getContextObjId());
785 $costum_block->setContextObjType($ilCtrl->getContextObjType());
786 $costum_block->setType($a_type);
787 $res = $costum_block->queryCntBlockForContext();
788 $cnt = (int) $res[0]["cnt"];
789 } else {
790 return false; // not implemented for repository yet
791 }
792
793
794 if ($ilSetting->get("block_limit_" . $a_type) > $cnt) {
795 return false;
796 } else {
797 return true;
798 }
799 }
800 return false;
801 }
ilSetting $settings
$res
Definition: ltiservices.php:69
global $ilSetting
Definition: privfeed.php:31

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

+ Here is the call graph for this function:

◆ executeCommand()

ilColumnGUI::executeCommand ( )

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

372 : string
373 {
374 $ilCtrl = $this->ctrl;
375
376 $ilCtrl->setParameter($this, "col_side", $this->getSide());
377
378 $next_class = $ilCtrl->getNextClass();
379 $cmd = $ilCtrl->getCmd("getHTML");
380
381 $cur_block_type = $this->request->getBlockType();
382
383 if ($next_class != "") {
384 // forward to block
385 if ($gui_class = array_search($cur_block_type, self::$block_types)) {
386 $ilCtrl->setParameter($this, "block_type", $cur_block_type);
387 $block_gui = new $gui_class();
388 $block_gui->setProperties($this->block_property[$cur_block_type] ?? []);
389 $block_gui->setRepositoryMode($this->getRepositoryMode());
390 $block_gui->setEnableEdit($this->getEnableEdit());
391 $block_gui->setAdminCommands($this->getAdminCommands());
392
393 if (in_array($gui_class, $this->custom_blocks[$this->getColType()]) ||
394 in_array($cur_block_type, $this->rep_block_types)) {
395 $block_class = substr($gui_class, 0, strlen($gui_class) - 3);
396 $app_block = new $block_class($this->request->getBlockId());
397 $block_gui->setBlock($app_block);
398 }
399 $html = $ilCtrl->forwardCommand($block_gui);
400 $ilCtrl->setParameter($this, "block_type", "");
401
402 return $html;
403 }
404 } else {
405 return (string) $this->$cmd();
406 }
407 return "";
408 }
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@inheritDoc

◆ getAdminCommands()

ilColumnGUI::getAdminCommands ( )

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

289 : bool
290 {
292 }

◆ getBlockProperties()

ilColumnGUI::getBlockProperties ( string  $a_block_type)

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

335 : array {
336 return $this->block_property[$a_block_type];
337 }

◆ getCmdSide()

static ilColumnGUI::getCmdSide ( )
static

Get Column Side of Current Command.

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

226 : ?string
227 {
228 global $DIC;
229
230 $block_service = new ILIAS\Container\Block\Service($DIC);
231 $request = $block_service->internal()
232 ->gui()
233 ->standardRequest();
234 return $request->getColSide();
235 }
ILIAS Container Block StandardGUIRequest $request

References $DIC.

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

+ Here is the caller graph for this function:

◆ getColType()

ilColumnGUI::getColType ( )

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

245 : string
246 {
247 return $this->coltype;
248 }

◆ getEnableEdit()

ilColumnGUI::getEnableEdit ( )

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

268 : bool
269 {
270 return $this->enableedit;
271 }

◆ getHTML()

ilColumnGUI::getHTML ( )

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

410 : string
411 {
412 $ilCtrl = $this->ctrl;
413
414 $ilCtrl->setParameter($this, "col_side", $this->getSide());
415
416 $this->tpl = new ilTemplate("tpl.column.html", true, true, "components/ILIAS/Container");
417 $this->determineBlocks();
418 $this->showBlocks();
419 return $this->tpl->get();
420 }
determineBlocks()
Determine which blocks to show.
special template class to simplify handling of ITX/PEAR

◆ getItemPresentationManager()

ilColumnGUI::getItemPresentationManager ( )

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

363 {
365 }
ItemPresentationManager $item_presentation

◆ getRepositoryItems()

ilColumnGUI::getRepositoryItems ( )

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

351 : array
352 {
354 }

◆ getRepositoryMode()

ilColumnGUI::getRepositoryMode ( )

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

279 : bool
280 {
282 }

◆ getScreenMode()

static ilColumnGUI::getScreenMode ( )
static

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

294 : string
295 {
296 global $DIC;
297
298 $ilCtrl = $DIC->ctrl();
299
300 $block_service = new ILIAS\Container\Block\Service($DIC);
301 $request = $block_service->internal()
302 ->gui()
303 ->standardRequest();
304
305 if ($ilCtrl->getCmdClass() == "ilcolumngui") {
306 switch ($ilCtrl->getCmd()) {
307 case "addBlock":
308 return IL_SCREEN_CENTER;
309 }
310 }
311
312 $cur_block_type = $request->getBlockType();
313
314 if ($class = array_search($cur_block_type, self::$block_types)) {
315 return call_user_func(array($class, 'getScreenMode'));
316 }
317
318 return IL_SCREEN_SIDE;
319 }
const IL_SCREEN_SIDE
const IL_SCREEN_CENTER

References $DIC, IL_SCREEN_CENTER, and IL_SCREEN_SIDE.

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

+ Here is the caller graph for this function:

◆ getSide()

ilColumnGUI::getSide ( )

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

258 : string
259 {
260 return $this->side;
261 }

◆ hasItemPresentationManager()

ilColumnGUI::hasItemPresentationManager ( )

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

367 : bool
368 {
369 return isset($this->item_presentation);
370 }

◆ isGloballyActivated()

ilColumnGUI::isGloballyActivated ( string  $a_type)
protected

Check whether a block type is globally activated.

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

707 : bool {
709 $ilCtrl = $this->ctrl;
710
711 if ($a_type == 'pdfeed') {
712 return false;
713 }
714
715 if (isset($this->check_global_activation[$a_type]) && $this->check_global_activation[$a_type]) {
716 if ($a_type === 'pd' . ilDashboardSidePanelSettingsRepository::NEWS) {
717 return ($this->dash_side_panel_settings->isEnabled($this->dash_side_panel_settings::NEWS) &&
718 $ilSetting->get('block_activated_news'));
719 } elseif ($a_type === 'pd' . ilDashboardSidePanelSettingsRepository::MAIL) {
720 return $this->dash_side_panel_settings->isEnabled($this->dash_side_panel_settings::MAIL);
721 } elseif ($a_type === 'pd' . ilDashboardSidePanelSettingsRepository::TASKS) {
722 return $this->dash_side_panel_settings->isEnabled($this->dash_side_panel_settings::TASKS);
723 } elseif ($a_type == 'news') {
724 return
725 $ilSetting->get('block_activated_news') &&
726
727 (!in_array($ilCtrl->getContextObjType(), ["grp", "crs"]) ||
729 $GLOBALS['ilCtrl']->getContextObjId(),
731 "1"
732 )) &&
734 $GLOBALS['ilCtrl']->getContextObjId(),
735 'cont_show_news',
736 "1"
737 );
738 } elseif ($ilSetting->get("block_activated_" . $a_type)) {
739 return true;
740 } elseif ($a_type == 'cal' || $a_type == 'chcal') {
741 return ilCalendarSettings::lookupCalendarContentPresentationEnabled($ilCtrl->getContextObjId());
742 } elseif ($a_type === 'pd' . ilDashboardSidePanelSettingsRepository::CALENDAR) {
743 if (!$this->dash_side_panel_settings->isEnabled($this->dash_side_panel_settings::CALENDAR)) {
744 return false;
745 }
746 return ilCalendarSettings::_getInstance()->isEnabled();
747 } elseif ($a_type == "tagcld") {
748 $tags_active = new ilSetting("tags");
749 return (bool) $tags_active->get("enable", "0");
750 } elseif ($a_type == "clsfct") {
751 if ($ilCtrl->getContextObjType() == "cat") { // taxonomy presentation in classification block
752 return true;
753 }
754 $tags_active = new ilSetting("tags"); // tags presentation in classification block
755 return (bool) $tags_active->get("enable", "0");
756 } elseif (
757 $a_type === "tusu" &&
758 ilObjCourse::lookupTutorialBlockSettingEabled($ilCtrl->getContextObjId())
759 ) {
760 return true;
761 } elseif ($a_type === "lpprogress") {
762 $obj_lp = ilObjectLP::getInstance($ilCtrl->getContextObjId());
763 $progress_block_settings = (new TrackingView())->progressBlock()->settings()->repository();
764 return $obj_lp->getCurrentMode() === ilLPObjSettings::LP_MODE_COLLECTION &&
765 $progress_block_settings->isBlockShownForObject($ilCtrl->getContextObjId());
766 }
767 return false;
768 }
769 return true;
770 }
static lookupCalendarContentPresentationEnabled(int $obj_id)
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
static lookupTutorialBlockSettingEabled(int $a_obj_id)
static getInstance(int $obj_id)
ILIAS Setting Class.
$GLOBALS["DIC"]
Definition: wac.php:54

◆ setAdminCommands()

ilColumnGUI::setAdminCommands ( bool  $a_admincommands)

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

284 : void
285 {
286 $this->admincommands = $a_admincommands;
287 }

Referenced by ilContainerGUI\setColumnSettings().

+ Here is the caller graph for this function:

◆ setAllBlockProperties()

ilColumnGUI::setAllBlockProperties ( array  $a_block_properties)

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

341 : void {
342 $this->block_property = $a_block_properties;
343 }

Referenced by ilInfoScreenGUI\setColumnSettings().

+ 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 325 of file class.ilColumnGUI.php.

329 : void {
330 $this->block_property[$a_block_type][$a_property] = $a_value;
331 }

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

+ Here is the caller graph for this function:

◆ setColType()

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

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

240 : void
241 {
242 $this->coltype = $a_coltype;
243 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setEnableEdit()

ilColumnGUI::setEnableEdit ( bool  $a_enableedit)

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

263 : void
264 {
265 $this->enableedit = $a_enableedit;
266 }

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

+ Here is the caller graph for this function:

◆ setItemPresentationManager()

ilColumnGUI::setItemPresentationManager ( ItemPresentationManager  $item_presentation)

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

358 : void {
359 $this->item_presentation = $item_presentation;
360 }

Referenced by ilContainerGUI\setColumnSettings().

+ Here is the caller graph for this function:

◆ setRepositoryItems()

ilColumnGUI::setRepositoryItems ( array  $a_repositoryitems)

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

347 : void {
348 $this->repositoryitems = $a_repositoryitems;
349 }

◆ setRepositoryMode()

ilColumnGUI::setRepositoryMode ( bool  $a_repositorymode)

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

275 : void {
276 $this->repositorymode = $a_repositorymode;
277 }

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

+ 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 253 of file class.ilColumnGUI.php.

253 : void
254 {
255 $this->side = $a_side;
256 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ showBlocks()

ilColumnGUI::showBlocks ( )

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

422 : void
423 {
424 $ilCtrl = $this->ctrl;
425 $ilUser = $this->user;
426
427 $i = 1;
428 $sum_moveable = count($this->blocks[$this->getSide()]);
429
430 foreach ($this->blocks[$this->getSide()] as $block) {
431 $gui_class = $block["class"] ?? null;
432 if (!is_string($gui_class)) {
433 continue;
434 }
435 $block_class = substr($gui_class, 0, strlen($gui_class) - 3);
436
437 // get block gui class
438 $block_gui = new $gui_class();
439 if (isset($this->block_property[$block["type"]])) {
440 $block_gui->setProperties($this->block_property[$block["type"]]);
441 }
442 $block_gui->setRepositoryMode($this->getRepositoryMode());
443 $block_gui->setEnableEdit($this->getEnableEdit());
444 $block_gui->setAdminCommands($this->getAdminCommands());
445
446 // get block for custom blocks
447 if ($block["custom"]) {
448 $path = "./../" . self::$locations[$gui_class] . "classes/" .
449 "class." . $block_class . ".php";
450 if (file_exists($path)) {
451 $app_block = new $block_class((int) $block["id"]);
452 } else {
453 // we only need generic block
454 $app_block = new ilCustomBlock((int) $block["id"]);
455 }
456 $block_gui->setBlock($app_block);
457 if (isset($block["ref_id"])) {
458 $block_gui->setRefId((int) $block["ref_id"]);
459 }
460 }
461
462 $ilCtrl->setParameter($this, "block_type", $block_gui->getBlockType());
463 $this->tpl->setCurrentBlock("col_block");
464
465 $html = $ilCtrl->getHTML($block_gui);
466
467 // don't render a block if it's empty
468 if ($html != "") {
469 $this->tpl->setVariable("BLOCK", $html);
470 $this->tpl->parseCurrentBlock();
471 $ilCtrl->setParameter($this, "block_type", "");
472 }
473 }
474 }

References $path.

◆ updateBlock()

ilColumnGUI::updateBlock ( )

Update Block (asynchronous)

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

480 : void
481 {
482 $ilCtrl = $this->ctrl;
483
484 $this->determineBlocks();
485 $i = 1;
486 $sum_moveable = count($this->blocks[$this->getSide()]);
487
488 foreach ($this->blocks[$this->getSide()] as $block) {
489 // set block id to context obj id,
490 // if block is not a custom block and context is not personal desktop
491 if (!$block["custom"] && $ilCtrl->getContextObjType() != "" && $ilCtrl->getContextObjType() != "user") {
492 $block["id"] = $ilCtrl->getContextObjId();
493 }
494
495 if ($this->request->getBlockId() == "block_" . $block["type"] . "_" . $block["id"]) {
496 $gui_class = $block["class"];
497 $block_class = substr($block["class"], 0, strlen($block["class"]) - 3);
498
499 $block_gui = new $gui_class();
500 $block_gui->setProperties($this->block_property[$block["type"]]);
501 $block_gui->setRepositoryMode($this->getRepositoryMode());
502 $block_gui->setEnableEdit($this->getEnableEdit());
503 $block_gui->setAdminCommands($this->getAdminCommands());
504
505 // get block for custom blocks
506 if ($block["custom"]) {
507 $app_block = new $block_class($block["id"]);
508 $block_gui->setBlock($app_block);
509 $block_gui->setRefId($block["ref_id"]);
510 }
511
512 $ilCtrl->setParameter($this, "block_type", $block["type"]);
513 echo $ilCtrl->getHTML($block_gui);
514 exit;
515 }
516
517 // count (moveable) blocks
518 if ($block["type"] != "pdfeedb"
519 && $block["type"] != "news") {
520 $i++;
521 } else {
522 $sum_moveable--;
523 }
524 }
525 echo "Error: ilColumnGUI::updateBlock: Block '" .
526 $this->request->getBlockId() . "' unknown.";
527 exit;
528 }
exit

References exit.

Field Documentation

◆ $admincommands

bool ilColumnGUI::$admincommands = false
protected

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

◆ $block_property

array ilColumnGUI::$block_property = array()
protected

Definition at line 65 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",
"ilTutorialSupportBlockGUI" => "tusu",
"ilPDCalendarBlockGUI" => 'pd' . ilDashboardSidePanelSettingsRepository::CALENDAR,
"ilConsultationHoursCalendarBlockGUI" => "chcal",
"ilSelectedItemsBlockGUI" => "pditems",
'ilPollBlockGUI' => 'poll',
'ilClassificationBlockGUI' => 'clsfct',
"ilPDStudyProgrammeSimpleListGUI" => "prgsimplelist",
"ilPDStudyProgrammeExpandableListGUI" => "prgexpandablelist",
"ilLPProgressBlockGUI" => "lpprogress"
)

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

◆ $blocks

array ilColumnGUI::$blocks = []
protected

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

◆ $browser

AgentDetermination ilColumnGUI::$browser
protected

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

◆ $check_global_activation

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

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

◆ $check_nr_limit

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

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

◆ $coltype

string ilColumnGUI::$coltype
protected

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

◆ $ctrl

ilCtrl ilColumnGUI::$ctrl
protected

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

◆ $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 148 of file class.ilColumnGUI.php.

◆ $dash_side_panel_settings

ilDashboardSidePanelSettingsRepository ilColumnGUI::$dash_side_panel_settings
protected

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

◆ $default_blocks

array ilColumnGUI::$default_blocks
protected

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

◆ $enableedit

bool ilColumnGUI::$enableedit = false
protected

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

◆ $item_presentation

ItemPresentationManager ilColumnGUI::$item_presentation = null
protected

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

◆ $lng

ilLanguage ilColumnGUI::$lng
protected

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

◆ $locations

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

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

◆ $rep_block_types

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

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

◆ $repositoryitems

array ilColumnGUI::$repositoryitems
protected

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

◆ $repositorymode

bool ilColumnGUI::$repositorymode = false
protected

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

◆ $request

ILIAS Container Block StandardGUIRequest ilColumnGUI::$request
protected

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

◆ $settings

ilSetting ilColumnGUI::$settings
protected

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

◆ $side

string ilColumnGUI::$side = IL_COL_RIGHT
protected

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

◆ $tpl

ilTemplate ilColumnGUI::$tpl
protected

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

◆ $type

string ilColumnGUI::$type
protected

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

◆ $user

ilObjUser ilColumnGUI::$user
protected

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


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