ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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...
 
 setMovementMode ($a_movementmode)
 Set Movement Mode. More...
 
 getMovementMode ()
 Get Movement Mode. More...
 
 setEnableMovement ($a_enablemovement)
 Set Enable Movement. More...
 
 getEnableMovement ()
 Get Enable Movement. 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

 addBlockSorting ()
 
 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 = null
 
 $movementmode = null
 
 $enablemovement = 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 201 of file class.ilColumnGUI.php.

202 {
203 global $DIC;
204
205 $this->ctrl = $DIC->ctrl();
206 $this->lng = $DIC->language();
207 $this->user = $DIC->user();
208 $this->tpl = $DIC["tpl"];
209 $this->browser = $DIC["ilBrowser"];
210 $this->settings = $DIC->settings();
211 $this->setColType($a_col_type);
212 $this->setSide($a_side);
213 }
user()
Definition: user.php:4
setColType($a_coltype)
Set Column Type.
setSide($a_side)
Set Side IL_COL_LEFT | IL_COL_RIGHT.
global $DIC
Definition: saml.php:7
settings()
Definition: settings.php:2

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

809 {
812
813 if ($_GET["block"] != "") {
814 $block = explode("_", $_GET["block"]);
815 include_once("Services/Block/classes/class.ilBlockSetting.php");
816 ilBlockSetting::_writeDetailLevel($block[0], 2, $ilUser->getId(), $block[1]);
817 }
818
819 $ilCtrl->returnToParent($this);
820 }
$_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 825 of file class.ilColumnGUI.php.

826 {
828
829 $class = array_search($_GET["block_type"], self::$block_types);
830
831 $ilCtrl->setCmdClass($class);
832 $ilCtrl->setCmd("create");
833 include_once("./" . self::$locations[$class] . "classes/class." . $class . ".php");
834 $block_gui = new $class();
835 $block_gui->setProperties($this->block_property[$_GET["block_type"]]);
836 $block_gui->setRepositoryMode($this->getRepositoryMode());
837 $block_gui->setEnableEdit($this->getEnableEdit());
838 $block_gui->setAdminCommands($this->getAdminCommands());
839
840 $ilCtrl->setParameter($this, "block_type", $_GET["block_type"]);
841 $html = $ilCtrl->forwardCommand($block_gui);
842 $ilCtrl->setParameter($this, "block_type", "");
843 return $html;
844 }
getRepositoryMode()
Get RepositoryMode.
getEnableEdit()
Get EnableEdit.
getAdminCommands()
Get Administration Commmands.
$html
Definition: example_001.php:87

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

+ Here is the call graph for this function:

◆ addBlockSorting()

ilColumnGUI::addBlockSorting ( )
protected

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

715 {
716 global $DIC;
717
718 if ($this->getSide() == IL_COL_CENTER && $this->getEnableMovement()) {
719 $ilBrowser = $this->browser;
720 $main_tpl = $DIC["tpl"];
722
723 include_once 'Services/jQuery/classes/class.iljQueryUtil.php';
726
727 if ($ilBrowser->isMobile() || $ilBrowser->isIpad()) {
728 $main_tpl->addJavaScript('./libs/bower/bower_components/jqueryui-touch-punch/jquery.ui.touch-punch.min.js');
729 }
730 $main_tpl->addJavaScript('./Services/Block/js/block_sorting.js');
731
732 // set the col_side parameter to pass the ctrl structure flow
733 $ilCtrl->setParameter($this, 'col_side', IL_COL_CENTER);
734
735 $this->tpl->setVariable('BLOCK_SORTING_STORAGE_URL', $ilCtrl->getLinkTarget($this, 'saveBlockSortingAsynch', '', true, false));
736 $this->tpl->setVariable('BLOCK_COLUMNS', json_encode(array('il_left_col', 'il_right_col')));
737 $this->tpl->setVariable('BLOCK_COLUMNS_SELECTOR', '#il_left_col,#il_right_col');
738 $this->tpl->setVariable('BLOCK_COLUMNS_PARAMETERS', json_encode(array(IL_COL_LEFT, IL_COL_RIGHT)));
739
740 // restore col_side parameter
741 $ilCtrl->setParameter($this, 'col_side', $this->getSide());
742 }
743 }
const IL_COL_RIGHT
const IL_COL_CENTER
const IL_COL_LEFT
getEnableMovement()
Get Enable Movement.
getSide()
Get Side IL_COL_LEFT | IL_COL_RIGHT.
static initjQueryUI($a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components....
static initjQuery($a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template

References $browser, $ctrl, $DIC, $ilCtrl, getEnableMovement(), getSide(), IL_COL_CENTER, IL_COL_LEFT, IL_COL_RIGHT, iljQueryUtil\initjQuery(), and iljQueryUtil\initjQueryUI().

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

226 {
227 self::$locations[$className] = $path;
228 }

References $path.

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

241 {
242 self::$block_types[$className] = $identifier;
243 }

◆ determineBlocks()

ilColumnGUI::determineBlocks ( )

Determine which blocks to show.

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

850 {
854
855 include_once("./Services/Block/classes/class.ilBlockSetting.php");
856 $this->blocks[IL_COL_LEFT] = array();
857 $this->blocks[IL_COL_RIGHT] = array();
858 $this->blocks[IL_COL_CENTER] = array();
859
860 $user_id = ($this->getColType() == "pd")
861 ? $ilUser->getId()
862 : 0;
863
864 $def_nr = 1000;
865 if (is_array($this->default_blocks[$this->getColType()])) {
866 foreach ($this->default_blocks[$this->getColType()] as $class => $def_side) {
867 $type = self::$block_types[$class];
868
869 if ($this->isGloballyActivated($type)) {
870 $nr = ilBlockSetting::_lookupNr($type, $user_id);
871 if ($nr === false) {
872 $nr = $def_nr++;
873 }
874
875
876 // extra handling for system messages, feedback block and news
877 if ($type == "news") { // always show news first
878 $nr = -15;
879 }
880 if ($type == "cal") {
881 $nr = -8;
882 }
883 if ($type == "pdsysmess") { // always show sys mess first
884// $nr = -15;
885 }
886 if ($type == "pdfeedb") { // always show feedback request second
887 $nr = -10;
888 }
889 if ($type == "clsfct") { // mkunkel wants to have this on top
890 $nr = -16;
891 }
893 if ($side === false) {
894 $side = $def_side;
895 }
896
897 $this->blocks[$side][] = array(
898 "nr" => $nr,
899 "class" => $class,
900 "type" => $type,
901 "id" => 0,
902 "custom" => false);
903 }
904 }
905 }
906
907 if (!$this->getRepositoryMode()) {
908 include_once("./Services/Block/classes/class.ilCustomBlock.php");
909 $custom_block = new ilCustomBlock();
910 $custom_block->setContextObjId($ilCtrl->getContextObjId());
911 $custom_block->setContextObjType($ilCtrl->getContextObjType());
912 $c_blocks = $custom_block->queryBlocksForContext();
913
914 foreach ($c_blocks as $c_block) {
915 $type = $c_block["type"];
916
917 if ($this->isGloballyActivated($type)) {
918 $class = array_search($type, self::$block_types);
919 $nr = ilBlockSetting::_lookupNr($type, $user_id, $c_block["id"]);
920 if ($nr === false) {
921 $nr = $def_nr++;
922 }
923 $side = ilBlockSetting::_lookupSide($type, $user_id, $c_block["id"]);
924 if ($side === false) {
926 }
927
928 $this->blocks[$side][] = array(
929 "nr" => $nr,
930 "class" => $class,
931 "type" => $type,
932 "id" => $c_block["id"],
933 "custom" => true);
934 }
935 }
936 } else { // get all subitems
937 include_once("./Services/Block/classes/class.ilCustomBlock.php");
938 $rep_items = $this->getRepositoryItems();
939
940 foreach ($this->rep_block_types as $block_type) {
941 if ($this->isGloballyActivated($block_type)) {
942 if (!is_array($rep_items[$block_type])) {
943 continue;
944 }
945 foreach ($rep_items[$block_type] as $item) {
946 $costum_block = new ilCustomBlock();
947 $costum_block->setContextObjId($item["obj_id"]);
948 $costum_block->setContextObjType($block_type);
949 $c_blocks = $costum_block->queryBlocksForContext();
950 $c_block = $c_blocks[0];
951
952 $type = $block_type;
953 $class = array_search($type, self::$block_types);
954 $nr = ilBlockSetting::_lookupNr($type, $user_id, $c_block["id"]);
955 if ($nr === false) {
956 $nr = $def_nr++;
957 }
958 $side = ilBlockSetting::_lookupSide($type, $user_id, $c_block["id"]);
959 if ($side === false) {
961 }
962
963 $this->blocks[$side][] = array(
964 "nr" => $nr,
965 "class" => $class,
966 "type" => $type,
967 "id" => $c_block["id"],
968 "custom" => true,
969 "ref_id" => $item["ref_id"]);
970 }
971 }
972 }
973
974 // repository object custom blocks
975 include_once("./Services/Block/classes/class.ilCustomBlock.php");
976 $custom_block = new ilCustomBlock();
977 $custom_block->setContextObjId($ilCtrl->getContextObjId());
978 $custom_block->setContextObjType($ilCtrl->getContextObjType());
979 $c_blocks = $custom_block->queryBlocksForContext(false); // get all sub-object types
980
981 foreach ($c_blocks as $c_block) {
982 $type = $c_block["type"];
983 $class = array_search($type, self::$block_types);
984
985 if ($class) {
986 $nr = $def_nr++;
988
989 $this->blocks[$side][] = array(
990 "nr" => $nr,
991 "class" => $class,
992 "type" => $type,
993 "id" => $c_block["id"],
994 "custom" => true);
995 }
996 }
997 }
998
999
1000 $this->blocks[IL_COL_LEFT] =
1001 ilUtil::sortArray($this->blocks[IL_COL_LEFT], "nr", "asc", true);
1002 $this->blocks[IL_COL_RIGHT] =
1003 ilUtil::sortArray($this->blocks[IL_COL_RIGHT], "nr", "asc", true);
1004 $this->blocks[IL_COL_CENTER] =
1005 ilUtil::sortArray($this->blocks[IL_COL_CENTER], "nr", "asc", true);
1006 }
static _lookupNr($a_type, $a_user=0, $a_block_id=0)
Lookup number.
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\_lookupNr(), 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 1073 of file class.ilColumnGUI.php.

1074 {
1077
1078 if ($this->check_nr_limit[$a_type]) {
1079 if (!$this->getRepositoryMode()) {
1080 include_once("./Services/Block/classes/class.ilCustomBlock.php");
1081 $costum_block = new ilCustomBlock();
1082 $costum_block->setContextObjId($ilCtrl->getContextObjId());
1083 $costum_block->setContextObjType($ilCtrl->getContextObjType());
1084 $costum_block->setType($a_type);
1085 $res = $costum_block->queryCntBlockForContext();
1086 $cnt = (int) $res[0]["cnt"];
1087 } else {
1088 return false; // not implemented for repository yet
1089 }
1090
1091
1092 if ($ilSetting->get("block_limit_" . $a_type) > $cnt) {
1093 return false;
1094 } else {
1095 return true;
1096 }
1097 }
1098 return false;
1099 }
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 472 of file class.ilColumnGUI.php.

473 {
475
476 $ilCtrl->setParameter($this, "col_side", $this->getSide());
477 //$ilCtrl->saveParameter($this, "col_side");
478
479 $next_class = $ilCtrl->getNextClass();
480 $cmd = $ilCtrl->getCmd("getHTML");
481
482 $cur_block_type = ($_GET["block_type"])
483 ? $_GET["block_type"]
484 : $_POST["block_type"];
485
486 if ($next_class != "") {
487 // forward to block
488 if ($gui_class = array_search($cur_block_type, self::$block_types)) {
489 include_once("./" . self::$locations[$gui_class] . "classes/" .
490 "class." . $gui_class . ".php");
491 $ilCtrl->setParameter($this, "block_type", $cur_block_type);
492 $block_gui = new $gui_class();
493 $block_gui->setProperties($this->block_property[$cur_block_type]);
494 $block_gui->setRepositoryMode($this->getRepositoryMode());
495 $block_gui->setEnableEdit($this->getEnableEdit());
496 $block_gui->setAdminCommands($this->getAdminCommands());
497
498 if (in_array($gui_class, $this->custom_blocks[$this->getColType()]) ||
499 in_array($cur_block_type, $this->rep_block_types)) {
500 $block_class = substr($gui_class, 0, strlen($gui_class)-3);
501 include_once("./" . self::$locations[$gui_class] . "classes/" .
502 "class." . $block_class . ".php");
503 $app_block = new $block_class($_GET["block_id"]);
504 $block_gui->setBlock($app_block);
505 }
506 $html = $ilCtrl->forwardCommand($block_gui);
507 $ilCtrl->setParameter($this, "block_type", "");
508
509 return $html;
510 }
511 } else {
512 return $this->$cmd();
513 }
514 }
$_POST["username"]

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

+ Here is the call graph for this function:

◆ getActionMenu()

ilColumnGUI::getActionMenu ( )
Returns
\ilAdvancedSelectionListGUI

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

1152 {
1153 return $this->action_menu;
1154 }

References $action_menu.

◆ getAdminCommands()

ilColumnGUI::getAdminCommands ( )

Get Administration Commmands.

Returns
boolean Administration Commmands

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

351 {
353 }

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

440 {
441 return $this->block_property[$a_block_type];
442 }

◆ getCmdSide()

static ilColumnGUI::getCmdSide ( )
static

Get Column Side of Current Command.

Returns
string Column Side

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

251 {
252 return $_GET["col_side"];
253 }

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

271 {
272 return $this->coltype;
273 }

Referenced by determineBlocks(), and executeCommand().

+ Here is the caller graph for this function:

◆ getEnableEdit()

ilColumnGUI::getEnableEdit ( )

Get EnableEdit.

Returns
boolean EnableEdit

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

311 {
312 return $this->enableedit;
313 }

References $enableedit.

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

+ Here is the caller graph for this function:

◆ getEnableMovement()

ilColumnGUI::getEnableMovement ( )

Get Enable Movement.

Returns
boolean Enable Movement

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

391 {
393 }

References $enablemovement.

Referenced by addBlockSorting().

+ Here is the caller graph for this function:

◆ getHTML()

ilColumnGUI::getHTML ( )

Get HTML for column.

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

520 {
522
523 $ilCtrl->setParameter($this, "col_side", $this->getSide());
524
525 $this->tpl = new ilTemplate("tpl.column.html", true, true, "Services/Block");
526
527 $this->determineBlocks();
528 $this->showBlocks();
529
530 if ($this->getEnableEdit() || !$this->getRepositoryMode()) {
531 $this->addHiddenBlockSelector();
532 }
533
534 return $this->tpl->get();
535 }
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:

◆ getMovementMode()

ilColumnGUI::getMovementMode ( )

Get Movement Mode.

Returns
boolean Movement Mode

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

371 {
372 return $this->movementmode;
373 }

References $movementmode.

Referenced by showBlocks().

+ Here is the caller graph for this function:

◆ getRepositoryItems()

ilColumnGUI::getRepositoryItems ( )

Get Repository Items.

Returns
array Repository Items

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

465 {
467 }

References $repositoryitems.

Referenced by determineBlocks().

+ Here is the caller graph for this function:

◆ getRepositoryMode()

ilColumnGUI::getRepositoryMode ( )

Get RepositoryMode.

Returns
boolean RepositoryMode

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

331 {
333 }

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

399 {
400 global $DIC;
401
402 $ilCtrl = $DIC->ctrl();
403
404 if ($ilCtrl->getCmdClass() == "ilcolumngui") {
405 switch ($ilCtrl->getCmd()) {
406 case "addBlock":
407 return IL_SCREEN_CENTER;
408 }
409 }
410
411 $cur_block_type = "";
412 if (isset($_GET["block_type"]) && $_GET["block_type"]) {
413 $cur_block_type = $_GET["block_type"];
414 } elseif (isset($_POST["block_type"])) {
415 $cur_block_type = $_POST["block_type"];
416 }
417
418 if ($class = array_search($cur_block_type, self::$block_types)) {
419 include_once("./" . self::$locations[$class] . "classes/" .
420 "class." . $class . ".php");
421 return call_user_func(array($class, 'getScreenMode'));
422 }
423
424 return IL_SCREEN_SIDE;
425 }
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 290 of file class.ilColumnGUI.php.

291 {
292 return $this->side;
293 }

References $side.

Referenced by addBlockSorting(), 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 1011 of file class.ilColumnGUI.php.

1012 {
1015
1016 if (isset($this->check_global_activation[$a_type]) && $this->check_global_activation[$a_type]) {
1017 if ($a_type == 'pdbookm') {
1018 if (!$ilSetting->get("disable_bookmarks")) {
1019 return true;
1020 }
1021 return false;
1022 } elseif ($a_type == 'pdnotes') {
1023 if (!$ilSetting->get("disable_notes")) {
1024 return true;
1025 }
1026 return false;
1027 } elseif ($a_type == 'pdportf') {
1028 if ($ilSetting->get("user_portfolios")) {
1029 $prfa_set = new ilSetting("prfa");
1030 if ($prfa_set->get("pd_block", false)) {
1031 return true;
1032 }
1033 }
1034 return false;
1035 } elseif ($a_type == 'news') {
1036 include_once 'Services/Container/classes/class.ilContainer.php';
1037 return
1038 $ilSetting->get('block_activated_news') &&
1040 $GLOBALS['ilCtrl']->getContextObjId(),
1041 'cont_show_news',
1042 true
1043 );
1044 } elseif ($a_type == 'pdsysmess') {
1045 require_once 'Services/Mail/classes/class.ilObjMail.php';
1046 return ((int) $ilSetting->get('pd_sys_msg_mode')) == ilObjMail::PD_SYS_MSG_OWN_BLOCK;
1047 } elseif ($ilSetting->get("block_activated_" . $a_type)) {
1048 return true;
1049 } elseif ($a_type == 'cal') {
1050 include_once('./Services/Calendar/classes/class.ilCalendarSettings.php');
1051 return ilCalendarSettings::lookupCalendarActivated($GLOBALS['ilCtrl']->getContextObjId());
1052 } elseif ($a_type == 'pdcal') {
1053 include_once('./Services/Calendar/classes/class.ilCalendarSettings.php');
1054 return ilCalendarSettings::_getInstance()->isEnabled();
1055 } elseif ($a_type == "tagcld") {
1056 $tags_active = new ilSetting("tags");
1057 return (bool) $tags_active->get("enable", false);
1058 } elseif ($a_type == "clsfct") {
1059 if ($ilCtrl->getContextObjType() == "cat") { // taxonomy presentation in classification block
1060 return true;
1061 }
1062 $tags_active = new ilSetting("tags"); // tags presentation in classification block
1063 return (bool) $tags_active->get("enable", false);
1064 }
1065 return false;
1066 }
1067 return true;
1068 }
static _getInstance()
get singleton instance
static lookupCalendarActivated($a_obj_id)
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
const PD_SYS_MSG_OWN_BLOCK
ILIAS Setting Class.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

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

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

1143 {
1144 $this->action_menu = $action_menu;
1145 return $this;
1146 }

References $action_menu.

◆ setAdminCommands()

ilColumnGUI::setAdminCommands (   $a_admincommands)

Set Administration Commmands.

Parameters
boolean$a_admincommandsAdministration Commmands

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

341 {
342 $this->admincommands = $a_admincommands;
343 }

Referenced by ilContainerGUI\setColumnSettings().

+ Here is the caller graph for this function:

◆ setAllBlockProperties()

ilColumnGUI::setAllBlockProperties (   $a_block_properties)

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

445 {
446 $this->block_property = $a_block_properties;
447 }

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

435 {
436 $this->block_property[$a_block_type][$a_property] = $a_value;
437 }

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

261 {
262 $this->coltype = $a_coltype;
263 }

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

301 {
302 $this->enableedit = $a_enableedit;
303 }

Referenced by ilObjectGUI\setColumnSettings().

+ Here is the caller graph for this function:

◆ setEnableMovement()

ilColumnGUI::setEnableMovement (   $a_enablemovement)

Set Enable Movement.

Parameters
boolean$a_enablemovementEnable Movement

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

381 {
382 $this->enablemovement = $a_enablemovement;
383 }

Referenced by ilContainerGUI\setColumnSettings().

+ Here is the caller graph for this function:

◆ setMovementMode()

ilColumnGUI::setMovementMode (   $a_movementmode)

Set Movement Mode.

Parameters
boolean$a_movementmodeMovement Mode

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

361 {
362 $this->movementmode = $a_movementmode;
363 }

◆ setRepositoryItems()

ilColumnGUI::setRepositoryItems (   $a_repositoryitems)

Set Repository Items.

Parameters
array$a_repositoryitemsRepository Items

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

455 {
456 $this->repositoryitems = $a_repositoryitems;
457 }

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

321 {
322 $this->repositorymode = $a_repositorymode;
323 }

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

281 {
282 $this->side = $a_side;
283 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ showBlocks()

ilColumnGUI::showBlocks ( )

Show blocks.

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

541 {
545
546 $i = 1;
547 $sum_moveable = count($this->blocks[$this->getSide()]);
548
549 foreach ($this->blocks[$this->getSide()] as $block) {
550 if ($ilCtrl->getContextObjType() != "user" ||
552 $block["type"],
553 $ilUser->getId(),
554 $block["id"]
555 ) > 0) {
556 $gui_class = $block["class"];
557 $block_class = substr($block["class"], 0, strlen($block["class"])-3);
558
559 // get block gui class
560 include_once("./" . self::$locations[$gui_class] . "classes/" .
561 "class." . $gui_class . ".php");
562 $block_gui = new $gui_class();
563 if (isset($this->block_property[$block["type"]])) {
564 $block_gui->setProperties($this->block_property[$block["type"]]);
565 }
566 $block_gui->setRepositoryMode($this->getRepositoryMode());
567 $block_gui->setEnableEdit($this->getEnableEdit());
568 $block_gui->setAdminCommands($this->getAdminCommands());
569
570 // get block for custom blocks
571 if ($block["custom"]) {
572 $path = "./" . self::$locations[$gui_class] . "classes/" .
573 "class." . $block_class . ".php";
574 if (file_exists($path)) {
575 include_once($path);
576 $app_block = new $block_class($block["id"]);
577 } else {
578 // we only need generic block
579 $app_block = new ilCustomBlock($block["id"]);
580 }
581 $block_gui->setBlock($app_block);
582 if (isset($block["ref_id"])) {
583 $block_gui->setRefId($block["ref_id"]);
584 }
585 }
586
587 $ilCtrl->setParameter($this, "block_type", $block_gui->getBlockType());
588 $this->tpl->setCurrentBlock("col_block");
589
590 $html = $ilCtrl->getHTML($block_gui);
591
592 // dummy block, if non visible, but movement is ongoing
593 if ($html == "" && $this->getRepositoryMode() &&
594 $this->getMovementMode()) {
595 include_once("./Services/Block/classes/class.ilDummyBlockGUI.php");
596 $bl = new ilDummyBlockGUI();
597 $bl->setBlockId($block["id"]);
598 $bl->setBlockType($block["type"]);
599 $bl->setTitle($lng->txt("invisible_block"));
600 $bl->setConfigMode($this->getMovementMode());
601 $html = $bl->getHTML();
602 }
603
604 // don't render a block if it's empty
605 if ($html != "") {
606 $this->tpl->setVariable("BLOCK", $html);
607 $this->tpl->parseCurrentBlock();
608 $ilCtrl->setParameter($this, "block_type", "");
609 }
610
611 // count (moveable) blocks
612 if ($block["type"] != "pdsysmess" && $block["type"] != "pdfeedb" &&
613 $block["type"] != "news") {
614 $i++;
615 } else {
616 $sum_moveable--;
617 }
618 }
619 }
620 }
static _lookupDetailLevel($a_type, $a_user=0, $a_block_id=0)
Lookup detail level.
getMovementMode()
Get Movement Mode.
BlockGUI class for dummy block.
$i
Definition: disco.tpl.php:19

References $ctrl, $html, $i, $ilCtrl, $ilUser, $lng, $path, $user, ilBlockSetting\_lookupDetailLevel(), getAdminCommands(), getEnableEdit(), getMovementMode(), 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 748 of file class.ilColumnGUI.php.

749 {
751
752 $this->determineBlocks();
753 $i = 1;
754 $sum_moveable = count($this->blocks[$this->getSide()]);
755
756 foreach ($this->blocks[$this->getSide()] as $block) {
757 include_once("./" . self::$locations[$block["class"]] . "classes/" .
758 "class." . $block["class"] . ".php");
759
760 // set block id to context obj id,
761 // if block is not a custom block and context is not personal desktop
762 if (!$block["custom"] && $ilCtrl->getContextObjType() != "" && $ilCtrl->getContextObjType() != "user") {
763 $block["id"] = $ilCtrl->getContextObjId();
764 }
765
766 //if (is_int(strpos($_GET["block_id"], "block_".$block["type"]."_".$block["id"])))
767
768 if ($_GET["block_id"] == "block_" . $block["type"] . "_" . $block["id"]) {
769 $gui_class = $block["class"];
770 $block_class = substr($block["class"], 0, strlen($block["class"])-3);
771
772 $block_gui = new $gui_class();
773 $block_gui->setProperties($this->block_property[$block["type"]]);
774 $block_gui->setRepositoryMode($this->getRepositoryMode());
775 $block_gui->setEnableEdit($this->getEnableEdit());
776 $block_gui->setAdminCommands($this->getAdminCommands());
777
778 // get block for custom blocks
779 if ($block["custom"]) {
780 include_once("./" . self::$locations[$gui_class] . "classes/" .
781 "class." . $block_class . ".php");
782 $app_block = new $block_class($block["id"]);
783 $block_gui->setBlock($app_block);
784 $block_gui->setRefId($block["ref_id"]);
785 }
786
787 $ilCtrl->setParameter($this, "block_type", $block["type"]);
788 echo $ilCtrl->getHTML($block_gui);
789 exit;
790 }
791
792 // count (moveable) blocks
793 if ($block["type"] != "pdsysmess" && $block["type"] != "pdfeedb"
794 && $block["type"] != "news") {
795 $i++;
796 } else {
797 $sum_moveable--;
798 }
799 }
800 echo "Error: ilColumnGUI::updateBlock: Block '" .
801 $_GET["block_id"] . "' unknown.";
802 exit;
803 }

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

Referenced by getActionMenu(), and setActionMenu().

◆ $admincommands

ilColumnGUI::$admincommands = null
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",
"ilPDNotesBlockGUI" => "pdnotes",
"ilUsersOnlineBlockGUI" => "pdusers",
"ilPDNewsBlockGUI" => "pdnews",
"ilBookmarkBlockGUI" => "pdbookm",
"ilNewsForContextBlockGUI" => "news",
"ilCalendarBlockGUI" => "cal",
"ilPDCalendarBlockGUI" => "pdcal",
"ilExternalFeedBlockGUI" => "feed",
"ilPDExternalFeedBlockGUI" => "pdfeed",
"ilPDSysMessageBlockGUI" => "pdsysmess",
"ilPDSelectedItemsBlockGUI" => "pditems",
'ilPDTaggingBlockGUI' => 'pdtag',
'ilChatroomBlockGUI' => 'chatviewer',
'ilPollBlockGUI' => 'poll',
'ilClassificationBlockGUI' => 'clsfct',
'ilPDPortfolioBlockGUI' => 'pdportf',
"ilPDStudyProgrammeSimpleListGUI" => "prgsimplelist",
"ilPDStudyProgrammeExpandableListGUI" => "prgexpandablelist",
"ilForumPostingDraftsBlockGUI" => "pdfrmpostdraft"
)

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

◆ $browser

ilColumnGUI::$browser
protected

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

Referenced by addBlockSorting().

◆ $check_global_activation

ilColumnGUI::$check_global_activation
protected
Initial value:
=
array("news" => true,
"cal" => true,
"pdcal" => true,
"pdnews" => true,
"pdfeed" => true,
"pdusers" => true,
"pdbookm" => true,
"pdtag" => true,
"pdsysmess" => true,
"pdnotes" => true,
"chatviewer" => true,
"pdfrmpostdraft" => true,
"tagcld" => true,
"pdportf" => true,
"clsfct" => true)

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

◆ $check_nr_limit

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

Definition at line 193 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("ilPDExternalFeedBlockGUI")
)

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

◆ $default_blocks

ilColumnGUI::$default_blocks
protected

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

◆ $enableedit

ilColumnGUI::$enableedit = false
protected

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

Referenced by getEnableEdit().

◆ $enablemovement

ilColumnGUI::$enablemovement = false
protected

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

Referenced by getEnableMovement().

◆ $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/",
"ilPDNotesBlockGUI" => "Services/Notes/",
"ilPDMailBlockGUI" => "Services/Mail/",
"ilUsersOnlineBlockGUI" => "Services/PersonalDesktop/",
"ilPDSysMessageBlockGUI" => "Services/Mail/",
"ilPDSelectedItemsBlockGUI" => "Services/PersonalDesktop/ItemsBlock/",
"ilBookmarkBlockGUI" => "Services/Bookmarks/",
"ilPDNewsBlockGUI" => "Services/News/",
"ilExternalFeedBlockGUI" => "Services/Block/",
"ilPDExternalFeedBlockGUI" => "Services/Feeds/",
'ilPDTaggingBlockGUI' => 'Services/Tagging/',
'ilChatroomBlockGUI' => 'Modules/Chatroom/',
'ilPollBlockGUI' => 'Modules/Poll/',
'ilClassificationBlockGUI' => 'Services/Classification/',
'ilPDPortfolioBlockGUI' => 'Modules/Portfolio/',
"ilPDStudyProgrammeSimpleListGUI" => "Modules/StudyProgramme/",
"ilPDStudyProgrammeExpandableListGUI" => "Modules/StudyProgramme/",
"ilForumPostingDraftsBlockGUI" => "Modules/Forum/"
)

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

◆ $movementmode

ilColumnGUI::$movementmode = null
protected

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

Referenced by getMovementMode().

◆ $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: