ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilColumnGUI Class Reference

Column user interface class. More...

+ Collaboration diagram for ilColumnGUI:

Public Member Functions

 __construct ($a_col_type="", $a_side="", $use_std_context=false)
 Constructor. More...
 
 setColType ($a_coltype)
 Set Column Type. More...
 
 getColType ()
 Get Column Type. More...
 
 setSide ($a_side)
 Set Side IL_COL_LEFT | IL_COL_RIGHT. More...
 
 getSide ()
 Get Side IL_COL_LEFT | IL_COL_RIGHT. More...
 
 setEnableEdit ($a_enableedit)
 Set EnableEdit. More...
 
 getEnableEdit ()
 Get EnableEdit. More...
 
 setRepositoryMode ($a_repositorymode)
 Set RepositoryMode. More...
 
 getRepositoryMode ()
 Get RepositoryMode. More...
 
 setAdminCommands ($a_admincommands)
 Set Administration Commmands. More...
 
 getAdminCommands ()
 Get Administration Commmands. More...
 
 setBlockProperty ($a_block_type, $a_property, $a_value)
 This function is supposed to be used for block type specific properties, that should be passed to ilBlockGUI->setProperty. More...
 
 getBlockProperties ($a_block_type)
 
 setAllBlockProperties ($a_block_properties)
 
 setRepositoryItems ($a_repositoryitems)
 Set Repository Items. More...
 
 getRepositoryItems ()
 Get Repository Items. More...
 
 executeCommand ()
 execute command More...
 
 getHTML ()
 Get HTML for column. More...
 
 showBlocks ()
 Show blocks. More...
 
 updateBlock ()
 Update Block (asynchronous) More...
 
 activateBlock ()
 Activate hidden block. More...
 
 addBlock ()
 Add a block. More...
 
 determineBlocks ()
 Determine which blocks to show. More...
 
 setActionMenu ($action_menu)
 
 getActionMenu ()
 

Static Public Member Functions

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

Protected Member Functions

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

Protected Attributes

 $ctrl
 
 $lng
 
 $user
 
 $tpl
 
 $browser
 
 $settings
 
 $side = IL_COL_RIGHT
 
 $type
 
 $enableedit = false
 
 $repositorymode = false
 
 $repositoryitems = array()
 
 $rep_block_types = array("feed","poll")
 
 $block_property = array()
 
 $admincommands = false
 
 $action_menu
 
 $default_blocks
 
 $custom_blocks
 
 $check_global_activation
 
 $check_nr_limit
 

Static Protected Attributes

static $locations
 
static $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
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

@ilCtrl_IsCalledBy ilColumnGUI: ilCalendarGUI @ilCtrl_Calls ilColumnGUI:

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

Parameters

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

176 {
177 global $DIC;
178
179 $this->ctrl = $DIC->ctrl();
180 $this->lng = $DIC->language();
181 $this->user = $DIC->user();
182 $this->tpl = $DIC["tpl"];
183 $this->browser = $DIC["ilBrowser"];
184 $this->settings = $DIC->settings();
185 $this->setColType($a_col_type);
186 $this->setSide($a_side);
187
188 $this->dash_side_panel_settings = new ilDashboardSidePanelSettingsRepository();
189 }
user()
Definition: user.php:4
setColType($a_coltype)
Set Column Type.
setSide($a_side)
Set Side IL_COL_LEFT | IL_COL_RIGHT.
settings()
Definition: settings.php:2
$DIC
Definition: xapitoken.php:46

References $DIC, setColType(), setSide(), settings(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ activateBlock()

ilColumnGUI::activateBlock ( )

Activate hidden block.

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

698 {
701
702 if ($_GET["block"] != "") {
703 $block = explode("_", $_GET["block"]);
704 include_once("Services/Block/classes/class.ilBlockSetting.php");
705 ilBlockSetting::_writeDetailLevel($block[0], 2, $ilUser->getId(), $block[1]);
706 }
707
708 $ilCtrl->returnToParent($this);
709 }
$_GET["client_id"]
static _writeDetailLevel($a_type, $a_value, $a_user=0, $a_block_id=0)
Write detail level to database.
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18

References $_GET, $ctrl, $ilCtrl, $ilUser, $user, and ilBlockSetting\_writeDetailLevel().

+ Here is the call graph for this function:

◆ addBlock()

ilColumnGUI::addBlock ( )

Add a block.

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

715 {
717
718 $class = array_search($_GET["block_type"], self::$block_types);
719
720 $ilCtrl->setCmdClass($class);
721 $ilCtrl->setCmd("create");
722 include_once("./" . self::$locations[$class] . "classes/class." . $class . ".php");
723 $block_gui = new $class();
724 $block_gui->setProperties($this->block_property[$_GET["block_type"]]);
725 $block_gui->setRepositoryMode($this->getRepositoryMode());
726 $block_gui->setEnableEdit($this->getEnableEdit());
727 $block_gui->setAdminCommands($this->getAdminCommands());
728
729 $ilCtrl->setParameter($this, "block_type", $_GET["block_type"]);
730 $html = $ilCtrl->forwardCommand($block_gui);
731 $ilCtrl->setParameter($this, "block_type", "");
732 return $html;
733 }
getRepositoryMode()
Get RepositoryMode.
getEnableEdit()
Get EnableEdit.
getAdminCommands()
Get Administration Commmands.

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

+ Here is the call graph for this function:

◆ addCustomBlockLocation()

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

Adds location information of the custom block gui.

@access public

Parameters
stringThe name of the custom block gui class
stringThe path of the custom block gui class

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

202 {
203 self::$locations[$className] = $path;
204 }

◆ addCustomBlockType()

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

Adds the block type of the custom block gui.

@access public

Parameters
stringThe name of the custom block gui class
stringThe identifier (block type) of the custom block gui

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

217 {
218 self::$block_types[$className] = $identifier;
219 }

◆ determineBlocks()

ilColumnGUI::determineBlocks ( )

Determine which blocks to show.

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

739 {
743
744 include_once("./Services/Block/classes/class.ilBlockSetting.php");
745 $this->blocks[IL_COL_LEFT] = array();
746 $this->blocks[IL_COL_RIGHT] = array();
747 $this->blocks[IL_COL_CENTER] = array();
748
749 $user_id = ($this->getColType() == "pd")
750 ? $ilUser->getId()
751 : 0;
752
753 $def_nr = 1000;
754 if (is_array($this->default_blocks[$this->getColType()])) {
755 foreach ($this->default_blocks[$this->getColType()] as $class => $def_side) {
756 $type = self::$block_types[$class];
757
758 if ($this->isGloballyActivated($type)) {
759 $nr = $def_nr++;
760
761 // extra handling for system messages, feedback block and news
762 if ($type == "news") { // always show news first
763 $nr = -15;
764 }
765 if ($type == "cal") {
766 $nr = -8;
767 }
768 if ($type == "pdfeedb") { // always show feedback request second
769 $nr = -10;
770 }
771 if ($type == "clsfct") { // mkunkel wants to have this on top
772 $nr = -16;
773 }
775 if ($side === false) {
776 $side = $def_side;
777 }
778 if ($side == IL_COL_LEFT) {
780 }
781
782 $this->blocks[$side][] = array(
783 "nr" => $nr,
784 "class" => $class,
785 "type" => $type,
786 "id" => 0,
787 "custom" => false);
788 }
789 }
790 }
791
792 if (!$this->getRepositoryMode()) {
793 include_once("./Services/Block/classes/class.ilCustomBlock.php");
794 $custom_block = new ilCustomBlock();
795 $custom_block->setContextObjId($ilCtrl->getContextObjId());
796 $custom_block->setContextObjType($ilCtrl->getContextObjType());
797 $c_blocks = $custom_block->queryBlocksForContext();
798
799 foreach ($c_blocks as $c_block) {
800 $type = $c_block["type"];
801
802 if ($this->isGloballyActivated($type)) {
803 $class = array_search($type, self::$block_types);
804 $nr = $def_nr++;
805 $side = ilBlockSetting::_lookupSide($type, $user_id, $c_block["id"]);
806 if ($side === false) {
808 }
809
810 $this->blocks[$side][] = array(
811 "nr" => $nr,
812 "class" => $class,
813 "type" => $type,
814 "id" => $c_block["id"],
815 "custom" => true);
816 }
817 }
818 } else { // get all subitems
819 include_once("./Services/Block/classes/class.ilCustomBlock.php");
820 $rep_items = $this->getRepositoryItems();
821
822 foreach ($this->rep_block_types as $block_type) {
823 if ($this->isGloballyActivated($block_type)) {
824 if (!is_array($rep_items[$block_type])) {
825 continue;
826 }
827 foreach ($rep_items[$block_type] as $item) {
828 $costum_block = new ilCustomBlock();
829 $costum_block->setContextObjId($item["obj_id"]);
830 $costum_block->setContextObjType($block_type);
831 $c_blocks = $costum_block->queryBlocksForContext();
832 $c_block = $c_blocks[0];
833
834 $type = $block_type;
835 $class = array_search($type, self::$block_types);
836 $nr = $def_nr++;
837 $side = ilBlockSetting::_lookupSide($type, $user_id, $c_block["id"]);
838 if ($side === false) {
840 }
841
842 $this->blocks[$side][] = array(
843 "nr" => $nr,
844 "class" => $class,
845 "type" => $type,
846 "id" => $c_block["id"],
847 "custom" => true,
848 "ref_id" => $item["ref_id"]);
849 }
850 }
851 }
852
853 // repository object custom blocks
854 include_once("./Services/Block/classes/class.ilCustomBlock.php");
855 $custom_block = new ilCustomBlock();
856 $custom_block->setContextObjId($ilCtrl->getContextObjId());
857 $custom_block->setContextObjType($ilCtrl->getContextObjType());
858 $c_blocks = $custom_block->queryBlocksForContext(false); // get all sub-object types
859
860 foreach ($c_blocks as $c_block) {
861 $type = $c_block["type"];
862 $class = array_search($type, self::$block_types);
863
864 if ($class) {
865 $nr = $def_nr++;
867
868 $this->blocks[$side][] = array(
869 "nr" => $nr,
870 "class" => $class,
871 "type" => $type,
872 "id" => $c_block["id"],
873 "custom" => true);
874 }
875 }
876 }
877
878
879 $this->blocks[IL_COL_LEFT] =
880 ilUtil::sortArray($this->blocks[IL_COL_LEFT], "nr", "asc", true);
881 $this->blocks[IL_COL_RIGHT] =
882 ilUtil::sortArray($this->blocks[IL_COL_RIGHT], "nr", "asc", true);
883 $this->blocks[IL_COL_CENTER] =
884 ilUtil::sortArray($this->blocks[IL_COL_CENTER], "nr", "asc", true);
885 }
const IL_COL_RIGHT
const IL_COL_CENTER
const IL_COL_LEFT
static _lookupSide($a_type, $a_user=0, $a_block_id=0)
Lookup side.
isGloballyActivated($a_type)
Check whether a block type is globally activated.
getColType()
Get Column Type.
getRepositoryItems()
Get Repository Items.
This is the super class of all custom blocks.
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
global $ilSetting
Definition: privfeed.php:17

References $ctrl, $ilCtrl, $ilSetting, $ilUser, $settings, $side, $type, $user, ilBlockSetting\_lookupSide(), getColType(), getRepositoryItems(), getRepositoryMode(), IL_COL_CENTER, IL_COL_LEFT, IL_COL_RIGHT, isGloballyActivated(), and ilUtil\sortArray().

Referenced by getHTML(), and updateBlock().

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

◆ exceededLimit()

ilColumnGUI::exceededLimit (   $a_type)
protected

Check whether limit is not exceeded.

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

953 {
956
957 if ($this->check_nr_limit[$a_type]) {
958 if (!$this->getRepositoryMode()) {
959 include_once("./Services/Block/classes/class.ilCustomBlock.php");
960 $costum_block = new ilCustomBlock();
961 $costum_block->setContextObjId($ilCtrl->getContextObjId());
962 $costum_block->setContextObjType($ilCtrl->getContextObjType());
963 $costum_block->setType($a_type);
964 $res = $costum_block->queryCntBlockForContext();
965 $cnt = (int) $res[0]["cnt"];
966 } else {
967 return false; // not implemented for repository yet
968 }
969
970
971 if ($ilSetting->get("block_limit_" . $a_type) > $cnt) {
972 return false;
973 } else {
974 return true;
975 }
976 }
977 return false;
978 }
foreach($_POST as $key=> $value) $res
$a_type
Definition: workflow.php:92

References $a_type, $ctrl, $ilCtrl, $ilSetting, $res, $settings, and getRepositoryMode().

+ Here is the call graph for this function:

◆ executeCommand()

ilColumnGUI::executeCommand ( )

execute command

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

409 {
411
412 $ilCtrl->setParameter($this, "col_side", $this->getSide());
413 //$ilCtrl->saveParameter($this, "col_side");
414
415 $next_class = $ilCtrl->getNextClass();
416 $cmd = $ilCtrl->getCmd("getHTML");
417
418 $cur_block_type = ($_GET["block_type"])
419 ? $_GET["block_type"]
420 : $_POST["block_type"];
421
422 if ($next_class != "") {
423 // forward to block
424 if ($gui_class = array_search($cur_block_type, self::$block_types)) {
425 include_once("./" . self::$locations[$gui_class] . "classes/" .
426 "class." . $gui_class . ".php");
427 $ilCtrl->setParameter($this, "block_type", $cur_block_type);
428 $block_gui = new $gui_class();
429 $block_gui->setProperties($this->block_property[$cur_block_type]);
430 $block_gui->setRepositoryMode($this->getRepositoryMode());
431 $block_gui->setEnableEdit($this->getEnableEdit());
432 $block_gui->setAdminCommands($this->getAdminCommands());
433
434 if (in_array($gui_class, $this->custom_blocks[$this->getColType()]) ||
435 in_array($cur_block_type, $this->rep_block_types)) {
436 $block_class = substr($gui_class, 0, strlen($gui_class) - 3);
437 include_once("./" . self::$locations[$gui_class] . "classes/" .
438 "class." . $block_class . ".php");
439 $app_block = new $block_class($_GET["block_id"]);
440 $block_gui->setBlock($app_block);
441 }
442 $html = $ilCtrl->forwardCommand($block_gui);
443 $ilCtrl->setParameter($this, "block_type", "");
444
445 return $html;
446 }
447 } else {
448 return $this->$cmd();
449 }
450 }
$_POST["username"]
getSide()
Get Side IL_COL_LEFT | IL_COL_RIGHT.

References $_GET, $_POST, $ctrl, $ilCtrl, getAdminCommands(), getColType(), getEnableEdit(), getRepositoryMode(), and getSide().

+ Here is the call graph for this function:

◆ getActionMenu()

ilColumnGUI::getActionMenu ( )
Returns
\ilAdvancedSelectionListGUI

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

1031 {
1032 return $this->action_menu;
1033 }

References $action_menu.

◆ getAdminCommands()

ilColumnGUI::getAdminCommands ( )

Get Administration Commmands.

Returns
boolean Administration Commmands

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

327 {
329 }

References $admincommands.

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

+ Here is the caller graph for this function:

◆ getBlockProperties()

ilColumnGUI::getBlockProperties (   $a_block_type)

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

376 {
377 return $this->block_property[$a_block_type];
378 }

◆ getCmdSide()

static ilColumnGUI::getCmdSide ( )
static

Get Column Side of Current Command.

Returns
string Column Side

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

227 {
228 return $_GET["col_side"];
229 }

References $_GET.

Referenced by ilCourseContentGUI\__forwardToColumnGUI(), ilContainerContentGUI\__forwardToColumnGUI(), and ilObjectGUI\getCenterColumnHTML().

+ Here is the caller graph for this function:

◆ getColType()

ilColumnGUI::getColType ( )

Get Column Type.

Returns
string Column Type

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

247 {
248 return $this->coltype;
249 }

Referenced by determineBlocks(), and executeCommand().

+ Here is the caller graph for this function:

◆ getEnableEdit()

ilColumnGUI::getEnableEdit ( )

Get EnableEdit.

Returns
boolean EnableEdit

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

287 {
288 return $this->enableedit;
289 }

References $enableedit.

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

+ Here is the caller graph for this function:

◆ getHTML()

ilColumnGUI::getHTML ( )

Get HTML for column.

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

456 {
458
459 $ilCtrl->setParameter($this, "col_side", $this->getSide());
460
461 $this->tpl = new ilTemplate("tpl.column.html", true, true, "Services/Block");
462 $this->determineBlocks();
463 $this->showBlocks();
464
465 if ($this->getEnableEdit() || !$this->getRepositoryMode()) {
466 $this->addHiddenBlockSelector();
467 }
468
469 return $this->tpl->get();
470 }
showBlocks()
Show blocks.
determineBlocks()
Determine which blocks to show.
special template class to simplify handling of ITX/PEAR

References $ctrl, $ilCtrl, determineBlocks(), getEnableEdit(), getRepositoryMode(), getSide(), and showBlocks().

+ Here is the call graph for this function:

◆ getRepositoryItems()

ilColumnGUI::getRepositoryItems ( )

Get Repository Items.

Returns
array Repository Items

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

401 {
403 }

References $repositoryitems.

Referenced by determineBlocks().

+ Here is the caller graph for this function:

◆ getRepositoryMode()

ilColumnGUI::getRepositoryMode ( )

Get RepositoryMode.

Returns
boolean RepositoryMode

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

307 {
309 }

References $repositorymode.

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

+ Here is the caller graph for this function:

◆ getScreenMode()

static ilColumnGUI::getScreenMode ( )
static

Get Screen Mode for current command.

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

335 {
336 global $DIC;
337
338 $ilCtrl = $DIC->ctrl();
339
340 if ($ilCtrl->getCmdClass() == "ilcolumngui") {
341 switch ($ilCtrl->getCmd()) {
342 case "addBlock":
343 return IL_SCREEN_CENTER;
344 }
345 }
346
347 $cur_block_type = "";
348 if (isset($_GET["block_type"]) && $_GET["block_type"]) {
349 $cur_block_type = $_GET["block_type"];
350 } elseif (isset($_POST["block_type"])) {
351 $cur_block_type = $_POST["block_type"];
352 }
353
354 if ($class = array_search($cur_block_type, self::$block_types)) {
355 include_once("./" . self::$locations[$class] . "classes/" .
356 "class." . $class . ".php");
357 return call_user_func(array($class, 'getScreenMode'));
358 }
359
360 return IL_SCREEN_SIDE;
361 }
const IL_SCREEN_SIDE
const IL_SCREEN_CENTER

References $_GET, $_POST, $DIC, $ilCtrl, IL_SCREEN_CENTER, and IL_SCREEN_SIDE.

Referenced by ilCourseContentGUI\__forwardToColumnGUI(), ilContainerContentGUI\__forwardToColumnGUI(), and ilObjectGUI\getCenterColumnHTML().

+ Here is the caller graph for this function:

◆ getSide()

ilColumnGUI::getSide ( )

Get Side IL_COL_LEFT | IL_COL_RIGHT.

Returns
string Side IL_COL_LEFT | IL_COL_RIGHT

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

267 {
268 return $this->side;
269 }

References $side.

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

+ Here is the caller graph for this function:

◆ isGloballyActivated()

ilColumnGUI::isGloballyActivated (   $a_type)
protected

Check whether a block type is globally activated.

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

891 {
894
895 if ($a_type == 'pdfeed') {
896 return false;
897 }
898
899 if (isset($this->check_global_activation[$a_type]) && $this->check_global_activation[$a_type]) {
900 if ($a_type == 'pdnews') {
901 return ($this->dash_side_panel_settings->isEnabled($this->dash_side_panel_settings::NEWS) &&
902 $ilSetting->get('block_activated_news'));
903 } elseif ($a_type == 'pdmail') {
904 return $this->dash_side_panel_settings->isEnabled($this->dash_side_panel_settings::MAIL);
905 } elseif ($a_type == 'pdtasks') {
906 return $this->dash_side_panel_settings->isEnabled($this->dash_side_panel_settings::TASKS);
907 } elseif ($a_type == 'news') {
908 include_once 'Services/Container/classes/class.ilContainer.php';
909 return
910 $ilSetting->get('block_activated_news') &&
911
912 (!in_array($ilCtrl->getContextObjType(), ["grp", "crs"]) ||
914 $GLOBALS['ilCtrl']->getContextObjId(),
916 true
917 )) &&
919 $GLOBALS['ilCtrl']->getContextObjId(),
920 'cont_show_news',
921 true
922 );
923 } elseif ($ilSetting->get("block_activated_" . $a_type)) {
924 return true;
925 } elseif ($a_type == 'cal') {
926 include_once('./Services/Calendar/classes/class.ilCalendarSettings.php');
927 return ilCalendarSettings::lookupCalendarActivated($GLOBALS['ilCtrl']->getContextObjId());
928 } elseif ($a_type == 'pdcal') {
929 if (!$this->dash_side_panel_settings->isEnabled($this->dash_side_panel_settings::CALENDAR)) {
930 return false;
931 }
932 include_once('./Services/Calendar/classes/class.ilCalendarSettings.php');
933 return ilCalendarSettings::_getInstance()->isEnabled();
934 } elseif ($a_type == "tagcld") {
935 $tags_active = new ilSetting("tags");
936 return (bool) $tags_active->get("enable", false);
937 } elseif ($a_type == "clsfct") {
938 if ($ilCtrl->getContextObjType() == "cat") { // taxonomy presentation in classification block
939 return true;
940 }
941 $tags_active = new ilSetting("tags"); // tags presentation in classification block
942 return (bool) $tags_active->get("enable", false);
943 }
944 return false;
945 }
946 return true;
947 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
static _getInstance()
get singleton instance
static lookupCalendarActivated($a_obj_id)
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
ILIAS Setting Class.

References $a_type, $ctrl, $GLOBALS, $ilCtrl, $ilSetting, $settings, ilCalendarSettings\_getInstance(), ilContainer\_lookupContainerSetting(), ilCalendarSettings\lookupCalendarActivated(), and ilObjectServiceSettingsGUI\USE_NEWS.

Referenced by determineBlocks().

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

◆ setActionMenu()

ilColumnGUI::setActionMenu (   $action_menu)
Parameters
\ilAdvancedSelectionListGUI$action_menu
Returns
ilColumnGUI

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

1022 {
1023 $this->action_menu = $action_menu;
1024 return $this;
1025 }

References $action_menu.

◆ setAdminCommands()

ilColumnGUI::setAdminCommands (   $a_admincommands)

Set Administration Commmands.

Parameters
boolean$a_admincommandsAdministration Commmands

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

317 {
318 $this->admincommands = $a_admincommands;
319 }

Referenced by ilContainerGUI\setColumnSettings().

+ Here is the caller graph for this function:

◆ setAllBlockProperties()

ilColumnGUI::setAllBlockProperties (   $a_block_properties)

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

381 {
382 $this->block_property = $a_block_properties;
383 }

◆ setBlockProperty()

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

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

Parameters
string$a_propertyproperty name
string$a_valueproperty value

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

371 {
372 $this->block_property[$a_block_type][$a_property] = $a_value;
373 }

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

+ Here is the caller graph for this function:

◆ setColType()

ilColumnGUI::setColType (   $a_coltype)

Set Column Type.

Parameters
string$a_coltypeColumn Type

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

237 {
238 $this->coltype = $a_coltype;
239 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setEnableEdit()

ilColumnGUI::setEnableEdit (   $a_enableedit)

Set EnableEdit.

Parameters
boolean$a_enableeditEnableEdit

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

277 {
278 $this->enableedit = $a_enableedit;
279 }

Referenced by ilObjectGUI\setColumnSettings().

+ Here is the caller graph for this function:

◆ setRepositoryItems()

ilColumnGUI::setRepositoryItems (   $a_repositoryitems)

Set Repository Items.

Parameters
array$a_repositoryitemsRepository Items

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

391 {
392 $this->repositoryitems = $a_repositoryitems;
393 }

Referenced by ilContainerGUI\setColumnSettings().

+ Here is the caller graph for this function:

◆ setRepositoryMode()

ilColumnGUI::setRepositoryMode (   $a_repositorymode)

Set RepositoryMode.

Parameters
boolean$a_repositorymodeRepositoryMode

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

297 {
298 $this->repositorymode = $a_repositorymode;
299 }

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

+ Here is the caller graph for this function:

◆ setSide()

ilColumnGUI::setSide (   $a_side)

Set Side IL_COL_LEFT | IL_COL_RIGHT.

Parameters
string$a_sideSide IL_COL_LEFT | IL_COL_RIGHT

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

257 {
258 $this->side = $a_side;
259 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ showBlocks()

ilColumnGUI::showBlocks ( )

Show blocks.

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

476 {
480
481 $i = 1;
482 $sum_moveable = count($this->blocks[$this->getSide()]);
483
484 foreach ($this->blocks[$this->getSide()] as $block) {
485 if ($ilCtrl->getContextObjType() != "user" ||
487 $block["type"],
488 $ilUser->getId(),
489 $block["id"]
490 ) > 0) {
491 $gui_class = $block["class"];
492 $block_class = substr($block["class"], 0, strlen($block["class"]) - 3);
493
494 // get block gui class
495 include_once("./" . self::$locations[$gui_class] . "classes/" .
496 "class." . $gui_class . ".php");
497 $block_gui = new $gui_class();
498 if (isset($this->block_property[$block["type"]])) {
499 $block_gui->setProperties($this->block_property[$block["type"]]);
500 }
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 $path = "./" . self::$locations[$gui_class] . "classes/" .
508 "class." . $block_class . ".php";
509 if (file_exists($path)) {
510 include_once($path);
511 $app_block = new $block_class($block["id"]);
512 } else {
513 // we only need generic block
514 $app_block = new ilCustomBlock($block["id"]);
515 }
516 $block_gui->setBlock($app_block);
517 if (isset($block["ref_id"])) {
518 $block_gui->setRefId($block["ref_id"]);
519 }
520 }
521
522 $ilCtrl->setParameter($this, "block_type", $block_gui->getBlockType());
523 $this->tpl->setCurrentBlock("col_block");
524
525 $html = $ilCtrl->getHTML($block_gui);
526
527 // don't render a block if it's empty
528 if ($html != "") {
529 $this->tpl->setVariable("BLOCK", $html);
530 $this->tpl->parseCurrentBlock();
531 $ilCtrl->setParameter($this, "block_type", "");
532 }
533
534 // count (moveable) blocks
535 if ($block["type"] != "pdfeedb" &&
536 $block["type"] != "news") {
537 $i++;
538 } else {
539 $sum_moveable--;
540 }
541 }
542 }
543 }
static _lookupDetailLevel($a_type, $a_user=0, $a_block_id=0)
Lookup detail level.
$i
Definition: metadata.php:24

References $ctrl, $i, $ilCtrl, $ilUser, $lng, $user, ilBlockSetting\_lookupDetailLevel(), getAdminCommands(), getEnableEdit(), getRepositoryMode(), and getSide().

Referenced by getHTML().

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

638 {
640
641 $this->determineBlocks();
642 $i = 1;
643 $sum_moveable = count($this->blocks[$this->getSide()]);
644
645 foreach ($this->blocks[$this->getSide()] as $block) {
646 include_once("./" . self::$locations[$block["class"]] . "classes/" .
647 "class." . $block["class"] . ".php");
648
649 // set block id to context obj id,
650 // if block is not a custom block and context is not personal desktop
651 if (!$block["custom"] && $ilCtrl->getContextObjType() != "" && $ilCtrl->getContextObjType() != "user") {
652 $block["id"] = $ilCtrl->getContextObjId();
653 }
654
655 //if (is_int(strpos($_GET["block_id"], "block_".$block["type"]."_".$block["id"])))
656
657 if ($_GET["block_id"] == "block_" . $block["type"] . "_" . $block["id"]) {
658 $gui_class = $block["class"];
659 $block_class = substr($block["class"], 0, strlen($block["class"]) - 3);
660
661 $block_gui = new $gui_class();
662 $block_gui->setProperties($this->block_property[$block["type"]]);
663 $block_gui->setRepositoryMode($this->getRepositoryMode());
664 $block_gui->setEnableEdit($this->getEnableEdit());
665 $block_gui->setAdminCommands($this->getAdminCommands());
666
667 // get block for custom blocks
668 if ($block["custom"]) {
669 include_once("./" . self::$locations[$gui_class] . "classes/" .
670 "class." . $block_class . ".php");
671 $app_block = new $block_class($block["id"]);
672 $block_gui->setBlock($app_block);
673 $block_gui->setRefId($block["ref_id"]);
674 }
675
676 $ilCtrl->setParameter($this, "block_type", $block["type"]);
677 echo $ilCtrl->getHTML($block_gui);
678 exit;
679 }
680
681 // count (moveable) blocks
682 if ($block["type"] != "pdfeedb"
683 && $block["type"] != "news") {
684 $i++;
685 } else {
686 $sum_moveable--;
687 }
688 }
689 echo "Error: ilColumnGUI::updateBlock: Block '" .
690 $_GET["block_id"] . "' unknown.";
691 exit;
692 }
exit
Definition: login.php:29

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

+ Here is the call graph for this function:

Field Documentation

◆ $action_menu

ilColumnGUI::$action_menu
protected

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

Referenced by getActionMenu(), and setActionMenu().

◆ $admincommands

ilColumnGUI::$admincommands = false
protected

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

Referenced by getAdminCommands().

◆ $block_property

ilColumnGUI::$block_property = array()
protected

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

◆ $block_types

ilColumnGUI::$block_types
staticprotected
Initial value:
= array(
"ilPDMailBlockGUI" => "pdmail",
"ilPDTasksBlockGUI" => "pdtasks",
"ilPDNewsBlockGUI" => "pdnews",
"ilNewsForContextBlockGUI" => "news",
"ilCalendarBlockGUI" => "cal",
"ilPDCalendarBlockGUI" => "pdcal",
"ilExternalFeedBlockGUI" => "feed",
"ilPDExternalFeedBlockGUI" => "pdfeed",
"ilPDSelectedItemsBlockGUI" => "pditems",
'ilPollBlockGUI' => 'poll',
'ilClassificationBlockGUI' => 'clsfct',
"ilPDStudyProgrammeSimpleListGUI" => "prgsimplelist",
"ilPDStudyProgrammeExpandableListGUI" => "prgexpandablelist",
)

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

◆ $browser

ilColumnGUI::$browser
protected

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

◆ $check_global_activation

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

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

◆ $check_nr_limit

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

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

◆ $ctrl

◆ $custom_blocks

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

◆ $default_blocks

ilColumnGUI::$default_blocks
protected
Initial value:
= array(
"cat" => array(
"ilNewsForContextBlockGUI" => IL_COL_RIGHT,
"ilClassificationBlockGUI" => IL_COL_RIGHT
),
"crs" => array(
"ilNewsForContextBlockGUI" => IL_COL_RIGHT,
"ilCalendarBlockGUI" => IL_COL_RIGHT,
"ilClassificationBlockGUI" => IL_COL_RIGHT
),
"grp" => array(
"ilNewsForContextBlockGUI" => IL_COL_RIGHT,
"ilCalendarBlockGUI" => IL_COL_RIGHT,
"ilClassificationBlockGUI" => IL_COL_RIGHT
),
"frm" => array("ilNewsForContextBlockGUI" => IL_COL_RIGHT),
"root" => array(),
"info" => array(
"ilNewsForContextBlockGUI" => IL_COL_RIGHT),
"pd" => array(
"ilPDTasksBlockGUI" => IL_COL_RIGHT,
"ilPDCalendarBlockGUI" => IL_COL_RIGHT,
"ilPDNewsBlockGUI" => IL_COL_RIGHT,
"ilPDStudyProgrammeSimpleListGUI" => IL_COL_CENTER,
"ilPDStudyProgrammeExpandableListGUI" => IL_COL_CENTER,
"ilPDSelectedItemsBlockGUI" => IL_COL_CENTER,
"ilPDMailBlockGUI" => IL_COL_RIGHT
)
)

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

◆ $enableedit

ilColumnGUI::$enableedit = false
protected

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

Referenced by getEnableEdit().

◆ $lng

ilColumnGUI::$lng
protected

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

Referenced by showBlocks().

◆ $locations

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

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

◆ $rep_block_types

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

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

◆ $repositoryitems

ilColumnGUI::$repositoryitems = array()
protected

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

Referenced by getRepositoryItems().

◆ $repositorymode

ilColumnGUI::$repositorymode = false
protected

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

Referenced by getRepositoryMode().

◆ $settings

ilColumnGUI::$settings
protected

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

Referenced by determineBlocks(), exceededLimit(), and isGloballyActivated().

◆ $side

ilColumnGUI::$side = IL_COL_RIGHT
protected

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

Referenced by determineBlocks(), and getSide().

◆ $tpl

ilColumnGUI::$tpl
protected

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

◆ $type

ilColumnGUI::$type
protected

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

Referenced by determineBlocks().

◆ $user

ilColumnGUI::$user
protected

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

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


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