ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 197 of file class.ilColumnGUI.php.

198 {
199 global $DIC;
200
201 $this->ctrl = $DIC->ctrl();
202 $this->lng = $DIC->language();
203 $this->user = $DIC->user();
204 $this->tpl = $DIC["tpl"];
205 $this->browser = $DIC["ilBrowser"];
206 $this->settings = $DIC->settings();
207 $this->setColType($a_col_type);
208 $this->setSide($a_side);
209 }
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 805 of file class.ilColumnGUI.php.

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

823 {
825
826 $class = array_search($_GET["block_type"], self::$block_types);
827
828 $ilCtrl->setCmdClass($class);
829 $ilCtrl->setCmd("create");
830 include_once("./" . self::$locations[$class] . "classes/class." . $class . ".php");
831 $block_gui = new $class();
832 $block_gui->setProperties($this->block_property[$_GET["block_type"]]);
833 $block_gui->setRepositoryMode($this->getRepositoryMode());
834 $block_gui->setEnableEdit($this->getEnableEdit());
835 $block_gui->setAdminCommands($this->getAdminCommands());
836
837 $ilCtrl->setParameter($this, "block_type", $_GET["block_type"]);
838 $html = $ilCtrl->forwardCommand($block_gui);
839 $ilCtrl->setParameter($this, "block_type", "");
840 return $html;
841 }
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 711 of file class.ilColumnGUI.php.

712 {
713 global $DIC;
714
715 if ($this->getSide() == IL_COL_CENTER && $this->getEnableMovement()) {
716 $ilBrowser = $this->browser;
717 $main_tpl = $DIC["tpl"];
719
720 include_once 'Services/jQuery/classes/class.iljQueryUtil.php';
723
724 if ($ilBrowser->isMobile() || $ilBrowser->isIpad()) {
725 $main_tpl->addJavaScript('./libs/bower/bower_components/jqueryui-touch-punch/jquery.ui.touch-punch.min.js');
726 }
727 $main_tpl->addJavaScript('./Services/Block/js/block_sorting.js');
728
729 // set the col_side parameter to pass the ctrl structure flow
730 $ilCtrl->setParameter($this, 'col_side', IL_COL_CENTER);
731
732 $this->tpl->setVariable('BLOCK_SORTING_STORAGE_URL', $ilCtrl->getLinkTarget($this, 'saveBlockSortingAsynch', '', true, false));
733 $this->tpl->setVariable('BLOCK_COLUMNS', json_encode(array('il_left_col', 'il_right_col')));
734 $this->tpl->setVariable('BLOCK_COLUMNS_SELECTOR', '#il_left_col,#il_right_col');
735 $this->tpl->setVariable('BLOCK_COLUMNS_PARAMETERS', json_encode(array(IL_COL_LEFT, IL_COL_RIGHT)));
736
737 // restore col_side parameter
738 $ilCtrl->setParameter($this, 'col_side', $this->getSide());
739 }
740 }
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 221 of file class.ilColumnGUI.php.

222 {
223 self::$locations[$className] = $path;
224 }
$path
Definition: aliased.php:25

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

237 {
238 self::$block_types[$className] = $identifier;
239 }

◆ determineBlocks()

ilColumnGUI::determineBlocks ( )

Determine which blocks to show.

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

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

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

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

1149 {
1150 return $this->action_menu;
1151 }

References $action_menu.

◆ getAdminCommands()

ilColumnGUI::getAdminCommands ( )

Get Administration Commmands.

Returns
boolean Administration Commmands

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

347 {
349 }

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

436 {
437 return $this->block_property[$a_block_type];
438 }

◆ getCmdSide()

static ilColumnGUI::getCmdSide ( )
static

Get Column Side of Current Command.

Returns
string Column Side

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

247 {
248 return $_GET["col_side"];
249 }

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

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

Referenced by determineBlocks(), and executeCommand().

+ Here is the caller graph for this function:

◆ getEnableEdit()

ilColumnGUI::getEnableEdit ( )

Get EnableEdit.

Returns
boolean EnableEdit

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

307 {
308 return $this->enableedit;
309 }

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

387 {
389 }

References $enablemovement.

Referenced by addBlockSorting().

+ Here is the caller graph for this function:

◆ getHTML()

ilColumnGUI::getHTML ( )

Get HTML for column.

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

516 {
518
519 $ilCtrl->setParameter($this, "col_side", $this->getSide());
520
521 $this->tpl = new ilTemplate("tpl.column.html", true, true, "Services/Block");
522
523 $this->determineBlocks();
524 $this->showBlocks();
525
526 if ($this->getEnableEdit() || !$this->getRepositoryMode()) {
527 $this->addHiddenBlockSelector();
528 }
529
530 return $this->tpl->get();
531 }
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 366 of file class.ilColumnGUI.php.

367 {
368 return $this->movementmode;
369 }

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

461 {
463 }

References $repositoryitems.

Referenced by determineBlocks().

+ Here is the caller graph for this function:

◆ getRepositoryMode()

ilColumnGUI::getRepositoryMode ( )

Get RepositoryMode.

Returns
boolean RepositoryMode

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

327 {
329 }

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

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

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

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

1009 {
1012
1013 if (isset($this->check_global_activation[$a_type]) && $this->check_global_activation[$a_type]) {
1014 if ($a_type == 'pdbookm') {
1015 if (!$ilSetting->get("disable_bookmarks")) {
1016 return true;
1017 }
1018 return false;
1019 } elseif ($a_type == 'pdnotes') {
1020 if (!$ilSetting->get("disable_notes")) {
1021 return true;
1022 }
1023 return false;
1024 } elseif ($a_type == 'pdportf') {
1025 if ($ilSetting->get("user_portfolios")) {
1026 $prfa_set = new ilSetting("prfa");
1027 if ($prfa_set->get("pd_block", false)) {
1028 return true;
1029 }
1030 }
1031 return false;
1032 } elseif ($a_type == 'news') {
1033 include_once 'Services/Container/classes/class.ilContainer.php';
1034 return
1035 $ilSetting->get('block_activated_news') &&
1037 $GLOBALS['ilCtrl']->getContextObjId(),
1038 'cont_show_news',
1039 true
1040 );
1041 } elseif ($a_type == 'pdsysmess') {
1042 require_once 'Services/Mail/classes/class.ilObjMail.php';
1043 return ((int) $ilSetting->get('pd_sys_msg_mode')) == ilObjMail::PD_SYS_MSG_OWN_BLOCK;
1044 } elseif ($ilSetting->get("block_activated_" . $a_type)) {
1045 return true;
1046 } elseif ($a_type == 'cal') {
1047 include_once('./Services/Calendar/classes/class.ilCalendarSettings.php');
1048 return ilCalendarSettings::lookupCalendarActivated($GLOBALS['ilCtrl']->getContextObjId());
1049 } elseif ($a_type == 'pdcal') {
1050 include_once('./Services/Calendar/classes/class.ilCalendarSettings.php');
1051 return ilCalendarSettings::_getInstance()->isEnabled();
1052 } elseif ($a_type == "tagcld") {
1053 $tags_active = new ilSetting("tags");
1054 return (bool) $tags_active->get("enable", false);
1055 } elseif ($a_type == "clsfct") {
1056 if ($ilCtrl->getContextObjType() == "cat") { // taxonomy presentation in classification block
1057 return true;
1058 }
1059 $tags_active = new ilSetting("tags"); // tags presentation in classification block
1060 return (bool) $tags_active->get("enable", false);
1061 }
1062 return false;
1063 }
1064 return true;
1065 }
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['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.

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

1140 {
1141 $this->action_menu = $action_menu;
1142 return $this;
1143 }

References $action_menu.

◆ setAdminCommands()

ilColumnGUI::setAdminCommands (   $a_admincommands)

Set Administration Commmands.

Parameters
boolean$a_admincommandsAdministration Commmands

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

337 {
338 $this->admincommands = $a_admincommands;
339 }

Referenced by ilContainerGUI\setColumnSettings().

+ Here is the caller graph for this function:

◆ setAllBlockProperties()

ilColumnGUI::setAllBlockProperties (   $a_block_properties)

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

441 {
442 $this->block_property = $a_block_properties;
443 }

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

431 {
432 $this->block_property[$a_block_type][$a_property] = $a_value;
433 }

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

257 {
258 $this->coltype = $a_coltype;
259 }

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

297 {
298 $this->enableedit = $a_enableedit;
299 }

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

377 {
378 $this->enablemovement = $a_enablemovement;
379 }

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

357 {
358 $this->movementmode = $a_movementmode;
359 }

◆ setRepositoryItems()

ilColumnGUI::setRepositoryItems (   $a_repositoryitems)

Set Repository Items.

Parameters
array$a_repositoryitemsRepository Items

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

451 {
452 $this->repositoryitems = $a_repositoryitems;
453 }

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

317 {
318 $this->repositorymode = $a_repositorymode;
319 }

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

277 {
278 $this->side = $a_side;
279 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ showBlocks()

ilColumnGUI::showBlocks ( )

Show blocks.

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

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

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

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",
"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 99 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,
"pdbookm" => true,
"pdtag" => true,
"pdsysmess" => true,
"pdnotes" => true,
"chatviewer" => true,
"pdfrmpostdraft" => true,
"tagcld" => true,
"pdportf" => true,
"clsfct" => true)

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

◆ $check_nr_limit

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

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

◆ $default_blocks

ilColumnGUI::$default_blocks
protected

Definition at line 122 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/",
"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: