ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
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.
 setColType ($a_coltype)
 Set Column Type.
 getColType ()
 Get Column Type.
 setSide ($a_side)
 Set Side IL_COL_LEFT | IL_COL_RIGHT.
 getSide ()
 Get Side IL_COL_LEFT | IL_COL_RIGHT.
 setEnableEdit ($a_enableedit)
 Set EnableEdit.
 getEnableEdit ()
 Get EnableEdit.
 setRepositoryMode ($a_repositorymode)
 Set RepositoryMode.
 getRepositoryMode ()
 Get RepositoryMode.
 setAdminCommands ($a_admincommands)
 Set Administration Commmands.
 getAdminCommands ()
 Get Administration Commmands.
 setMovementMode ($a_movementmode)
 Set Movement Mode.
 getMovementMode ()
 Get Movement Mode.
 setEnableMovement ($a_enablemovement)
 Set Enable Movement.
 getEnableMovement ()
 Get Enable Movement.
 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.
 getBlockProperties ($a_block_type)
 setAllBlockProperties ($a_block_properties)
 setRepositoryItems ($a_repositoryitems)
 Set Repository Items.
 getRepositoryItems ()
 Get Repository Items.
executeCommand ()
 execute command
 getHTML ()
 Get HTML for column.
 showBlocks ()
 Show blocks.
 updateBlock ()
 Update Block (asynchronous)
 activateBlock ()
 Activate hidden block.
 addBlock ()
 Add a block.
 determineBlocks ()
 Determine which blocks to show.
 setActionMenu ($action_menu)
 getActionMenu ()

Static Public Member Functions

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

Protected Member Functions

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

Protected Attributes

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

ilColumnGUI: ilCalendarGUI ilColumnGUI:

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

Constructor & Destructor Documentation

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

Constructor.

Parameters

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

References setColType(), and setSide().

{
$this->setColType($a_col_type);
$this->setSide($a_side);
}

+ Here is the call graph for this function:

Member Function Documentation

ilColumnGUI::activateBlock ( )

Activate hidden block.

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

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

{
global $ilUser, $ilCtrl;
if ($_GET["block"] != "")
{
$block = explode("_", $_GET["block"]);
include_once("Services/Block/classes/class.ilBlockSetting.php");
ilBlockSetting::_writeDetailLevel($block[0], 2, $ilUser->getId(), $block[1]);
}
$ilCtrl->returnToParent($this);
}

+ Here is the call graph for this function:

ilColumnGUI::addBlock ( )

Add a block.

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

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

{
global $ilCtrl;
$class = array_search($_GET["block_type"], self::$block_types);
$ilCtrl->setCmdClass($class);
$ilCtrl->setCmd("create");
include_once("./".self::$locations[$class]."classes/class.".$class.".php");
$block_gui = new $class();
$block_gui->setProperties($this->block_property[$_GET["block_type"]]);
$block_gui->setRepositoryMode($this->getRepositoryMode());
$block_gui->setEnableEdit($this->getEnableEdit());
$block_gui->setAdminCommands($this->getAdminCommands());
$ilCtrl->setParameter($this, "block_type", $_GET["block_type"]);
$html = $ilCtrl->forwardCommand($block_gui);
$ilCtrl->setParameter($this, "block_type", "");
return $html;
}

+ Here is the call graph for this function:

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

Adds location information of the custom block gui.

public

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

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

References $path.

{
self::$locations[$className] = $path;
}
static ilColumnGUI::addCustomBlockType (   $className,
  $identifier 
)
static

Adds the block type of the custom block gui.

public

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

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

{
self::$block_types[$className] = $identifier;
}
ilColumnGUI::determineBlocks ( )

Determine which blocks to show.

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

References $ilCtrl, $ilSetting, $ilUser, $side, $type, 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().

{
include_once("./Services/Block/classes/class.ilBlockSetting.php");
$this->blocks[IL_COL_LEFT] = array();
$this->blocks[IL_COL_RIGHT] = array();
$this->blocks[IL_COL_CENTER] = array();
$user_id = ($this->getColType() == "pd")
? $ilUser->getId()
: 0;
$def_nr = 1000;
if (is_array($this->default_blocks[$this->getColType()]))
{
foreach($this->default_blocks[$this->getColType()] as $class => $def_side)
{
$type = self::$block_types[$class];
{
$nr = ilBlockSetting::_lookupNr($type, $user_id);
if ($nr === false)
{
$nr = $def_nr++;
}
// extra handling for system messages, feedback block and news
if ($type == "news") // always show news first
{
$nr = -15;
}
if ($type == "cal")
{
$nr = -8;
}
if ($type == "pdsysmess") // always show sys mess first
{
// $nr = -15;
}
if ($type == "pdfeedb") // always show feedback request second
{
$nr = -10;
}
if ($side === false)
{
$side = $def_side;
}
$this->blocks[$side][] = array(
"nr" => $nr,
"class" => $class,
"type" => $type,
"id" => 0,
"custom" => false);
}
}
}
if (!$this->getRepositoryMode())
{
include_once("./Services/Block/classes/class.ilCustomBlock.php");
$costum_block = new ilCustomBlock();
$costum_block->setContextObjId($ilCtrl->getContextObjId());
$costum_block->setContextObjType($ilCtrl->getContextObjType());
$c_blocks = $costum_block->queryBlocksForContext();
foreach($c_blocks as $c_block)
{
$type = $c_block["type"];
{
$class = array_search($type, self::$block_types);
$nr = ilBlockSetting::_lookupNr($type, $user_id, $c_block["id"]);
if ($nr === false)
{
$nr = $def_nr++;
}
$side = ilBlockSetting::_lookupSide($type, $user_id, $c_block["id"]);
if ($side === false)
{
}
$this->blocks[$side][] = array(
"nr" => $nr,
"class" => $class,
"type" => $type,
"id" => $c_block["id"],
"custom" => true);
}
}
}
else // get all subitems
{
include_once("./Services/Block/classes/class.ilCustomBlock.php");
$rep_items = $this->getRepositoryItems();
foreach($this->rep_block_types as $block_type)
{
if ($this->isGloballyActivated($block_type))
{
if (!is_array($rep_items[$block_type]))
{
continue;
}
foreach($rep_items[$block_type] as $item)
{
$costum_block = new ilCustomBlock();
$costum_block->setContextObjId($item["obj_id"]);
$costum_block->setContextObjType($block_type);
$c_blocks = $costum_block->queryBlocksForContext();
$c_block = $c_blocks[0];
$type = $block_type;
$class = array_search($type, self::$block_types);
$nr = ilBlockSetting::_lookupNr($type, $user_id, $c_block["id"]);
if ($nr === false)
{
$nr = $def_nr++;
}
$side = ilBlockSetting::_lookupSide($type, $user_id, $c_block["id"]);
if ($side === false)
{
}
$this->blocks[$side][] = array(
"nr" => $nr,
"class" => $class,
"type" => $type,
"id" => $c_block["id"],
"custom" => true,
"ref_id" => $item["ref_id"]);
}
}
}
}
$this->blocks[IL_COL_LEFT] =
ilUtil::sortArray($this->blocks[IL_COL_LEFT], "nr", "asc", true);
$this->blocks[IL_COL_RIGHT] =
ilUtil::sortArray($this->blocks[IL_COL_RIGHT], "nr", "asc", true);
$this->blocks[IL_COL_CENTER] =
ilUtil::sortArray($this->blocks[IL_COL_CENTER], "nr", "asc", true);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilColumnGUI::exceededLimit (   $a_type)
protected

Check whether limit is not exceeded.

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

References $ilCtrl, $ilSetting, $res, and getRepositoryMode().

{
if ($this->check_nr_limit[$a_type])
{
if (!$this->getRepositoryMode())
{
include_once("./Services/Block/classes/class.ilCustomBlock.php");
$costum_block = new ilCustomBlock();
$costum_block->setContextObjId($ilCtrl->getContextObjId());
$costum_block->setContextObjType($ilCtrl->getContextObjType());
$costum_block->setType($a_type);
$res = $costum_block->queryCntBlockForContext();
$cnt = (int) $res[0]["cnt"];
}
else
{
return false; // not implemented for repository yet
}
if ($ilSetting->get("block_limit_".$a_type) > $cnt)
{
return false;
}
else
{
return true;
}
}
return false;
}

+ Here is the call graph for this function:

& ilColumnGUI::executeCommand ( )

execute command

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

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

{
global $ilCtrl;
$ilCtrl->setParameter($this, "col_side" ,$this->getSide());
//$ilCtrl->saveParameter($this, "col_side");
$next_class = $ilCtrl->getNextClass();
$cmd = $ilCtrl->getCmd("getHTML");
$cur_block_type = ($_GET["block_type"])
? $_GET["block_type"]
: $_POST["block_type"];
if ($next_class != "")
{
// forward to block
if ($gui_class = array_search($cur_block_type, self::$block_types))
{
include_once("./".self::$locations[$gui_class]."classes/".
"class.".$gui_class.".php");
$ilCtrl->setParameter($this, "block_type", $cur_block_type);
$block_gui = new $gui_class();
$block_gui->setProperties($this->block_property[$cur_block_type]);
$block_gui->setRepositoryMode($this->getRepositoryMode());
$block_gui->setEnableEdit($this->getEnableEdit());
$block_gui->setAdminCommands($this->getAdminCommands());
if (in_array($gui_class, $this->custom_blocks[$this->getColType()]) ||
in_array($cur_block_type, $this->rep_block_types))
{
$block_class = substr($gui_class, 0, strlen($gui_class)-3);
include_once("./".self::$locations[$gui_class]."classes/".
"class.".$block_class.".php");
$app_block = new $block_class($_GET["block_id"]);
$block_gui->setBlock($app_block);
}
$html = $ilCtrl->forwardCommand($block_gui);
$ilCtrl->setParameter($this, "block_type", "");
return $html;
}
}
else
{
return $this->$cmd();
}
}

+ Here is the call graph for this function:

ilColumnGUI::getActionMenu ( )
Returns

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

References $action_menu.

{
}
ilColumnGUI::getAdminCommands ( )

Get Administration Commmands.

Returns
boolean Administration Commmands

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

References $admincommands.

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

{
}

+ Here is the caller graph for this function:

ilColumnGUI::getBlockProperties (   $a_block_type)

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

{
return $this->block_property[$a_block_type];
}
static ilColumnGUI::getCmdSide ( )
static

Get Column Side of Current Command.

Returns
string Column Side

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

References $_GET.

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

{
return $_GET["col_side"];
}

+ Here is the caller graph for this function:

ilColumnGUI::getColType ( )

Get Column Type.

Returns
string Column Type

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

Referenced by determineBlocks(), and executeCommand().

{
return $this->coltype;
}

+ Here is the caller graph for this function:

ilColumnGUI::getEnableEdit ( )

Get EnableEdit.

Returns
boolean EnableEdit

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

References $enableedit.

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

{
}

+ Here is the caller graph for this function:

ilColumnGUI::getEnableMovement ( )

Get Enable Movement.

Returns
boolean Enable Movement

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

References $enablemovement.

{
}
ilColumnGUI::getHTML ( )

Get HTML for column.

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

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

{
global $ilCtrl, $ilBench;
$ilBench->start("Column", "getHTML");
$ilCtrl->setParameter($this, "col_side" ,$this->getSide());
$this->tpl = new ilTemplate("tpl.column.html", true, true, "Services/Block");
$ilBench->start("Column", "determineBlocks");
$this->determineBlocks();
$ilBench->stop("Column", "determineBlocks");
$ilBench->start("Column", "showBlocks");
$this->showBlocks();
$ilBench->stop("Column", "showBlocks");
if ($this->getEnableEdit() || !$this->getRepositoryMode())
{
$this->addHiddenBlockSelector();
}
$ilBench->stop("Column", "getHTML");
return $this->tpl->get();
}

+ Here is the call graph for this function:

ilColumnGUI::getMovementMode ( )

Get Movement Mode.

Returns
boolean Movement Mode

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

References $movementmode.

Referenced by showBlocks().

{
}

+ Here is the caller graph for this function:

ilColumnGUI::getRepositoryItems ( )

Get Repository Items.

Returns
array Repository Items

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

References $repositoryitems.

Referenced by determineBlocks().

+ Here is the caller graph for this function:

ilColumnGUI::getRepositoryMode ( )

Get RepositoryMode.

Returns
boolean RepositoryMode

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

References $repositorymode.

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

{
}

+ Here is the caller graph for this function:

static ilColumnGUI::getScreenMode ( )
static

Get Screen Mode for current command.

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

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

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

{
global $ilCtrl;
if ($ilCtrl->getCmdClass() == "ilcolumngui")
{
switch ($ilCtrl->getCmd())
{
case "addBlock":
}
}
$cur_block_type = "";
if (isset($_GET["block_type"]) && $_GET["block_type"])
{
$cur_block_type = $_GET["block_type"];
}
else if (isset($_POST["block_type"]))
{
$cur_block_type = $_POST["block_type"];
}
if ($class = array_search($cur_block_type, self::$block_types))
{
include_once("./".self::$locations[$class]."classes/".
"class.".$class.".php");
return call_user_func(array($class, 'getScreenMode'));
}
}

+ Here is the caller graph for this function:

ilColumnGUI::getSide ( )

Get Side IL_COL_LEFT | IL_COL_RIGHT.

Returns
string Side IL_COL_LEFT | IL_COL_RIGHT

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

References $side.

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

{
return $this->side;
}

+ Here is the caller graph for this function:

ilColumnGUI::isGloballyActivated (   $a_type)
protected

Check whether a block type is globally activated.

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

References $GLOBALS, $ilSetting, ilCalendarSettings\_getInstance(), ilContainer\_lookupContainerSetting(), and ilCalendarSettings\lookupCalendarActivated().

Referenced by determineBlocks().

{
global $ilSetting;
if (isset($this->check_global_activation[$a_type]) && $this->check_global_activation[$a_type])
{
if ($a_type == 'pdbookm')
{
if (!$ilSetting->get("disable_bookmarks"))
{
return true;
}
return false;
}
else if ($a_type == 'pdnotes')
{
if (!$ilSetting->get("disable_notes"))
{
return true;
}
return false;
}
elseif($a_type == 'news')
{
include_once 'Services/Container/classes/class.ilContainer.php';
return
$ilSetting->get('block_activated_news') &&
$GLOBALS['ilCtrl']->getContextObjId(),
'cont_show_news',
true
);
}
else if ($ilSetting->get("block_activated_".$a_type))
{
return true;
}
elseif($a_type == 'cal')
{
include_once('./Services/Calendar/classes/class.ilCalendarSettings.php');
return ilCalendarSettings::lookupCalendarActivated($GLOBALS['ilCtrl']->getContextObjId());
}
elseif($a_type == 'pdcal')
{
include_once('./Services/Calendar/classes/class.ilCalendarSettings.php');
return ilCalendarSettings::_getInstance()->isEnabled();
}
return false;
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

References $action_menu.

{
$this->action_menu = $action_menu;
return $this;
}
ilColumnGUI::setAdminCommands (   $a_admincommands)

Set Administration Commmands.

Parameters
boolean$a_admincommandsAdministration Commmands

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

{
$this->admincommands = $a_admincommands;
}
ilColumnGUI::setAllBlockProperties (   $a_block_properties)

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

{
$this->block_property = $a_block_properties;
}
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 376 of file class.ilColumnGUI.php.

{
$this->block_property[$a_block_type][$a_property] = $a_value;
}
ilColumnGUI::setColType (   $a_coltype)

Set Column Type.

Parameters
string$a_coltypeColumn Type

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

Referenced by __construct().

{
$this->coltype = $a_coltype;
}

+ Here is the caller graph for this function:

ilColumnGUI::setEnableEdit (   $a_enableedit)

Set EnableEdit.

Parameters
boolean$a_enableeditEnableEdit

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

{
$this->enableedit = $a_enableedit;
}
ilColumnGUI::setEnableMovement (   $a_enablemovement)

Set Enable Movement.

Parameters
boolean$a_enablemovementEnable Movement

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

{
$this->enablemovement = $a_enablemovement;
}
ilColumnGUI::setMovementMode (   $a_movementmode)

Set Movement Mode.

Parameters
boolean$a_movementmodeMovement Mode

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

{
$this->movementmode = $a_movementmode;
}
ilColumnGUI::setRepositoryItems (   $a_repositoryitems)

Set Repository Items.

Parameters
array$a_repositoryitemsRepository Items

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

{
$this->repositoryitems = $a_repositoryitems;
}
ilColumnGUI::setRepositoryMode (   $a_repositorymode)

Set RepositoryMode.

Parameters
boolean$a_repositorymodeRepositoryMode

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

{
$this->repositorymode = $a_repositorymode;
}
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 218 of file class.ilColumnGUI.php.

Referenced by __construct().

{
$this->side = $a_side;
}

+ Here is the caller graph for this function:

ilColumnGUI::showBlocks ( )

Show blocks.

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

References $ilBench, $ilCtrl, $ilUser, $lng, ilBlockSetting\_lookupDetailLevel(), getAdminCommands(), getEnableEdit(), getMovementMode(), getRepositoryMode(), and getSide().

Referenced by getHTML().

{
$i = 1;
$sum_moveable = count($this->blocks[$this->getSide()]);
foreach($this->blocks[$this->getSide()] as $block)
{
if ($ilCtrl->getContextObjType() != "user" ||
$ilUser->getId(), $block["id"]) > 0)
{
$gui_class = $block["class"];
$block_class = substr($block["class"], 0, strlen($block["class"])-3);
// get block gui class
include_once("./".self::$locations[$gui_class]."classes/".
"class.".$gui_class.".php");
$ilBench->start("Column", "instantiate-".$block["type"]);
$block_gui = new $gui_class();
$ilBench->stop("Column", "instantiate-".$block["type"]);
if (isset($this->block_property[$block["type"]]))
{
$block_gui->setProperties($this->block_property[$block["type"]]);
}
$block_gui->setRepositoryMode($this->getRepositoryMode());
$block_gui->setEnableEdit($this->getEnableEdit());
$block_gui->setAdminCommands($this->getAdminCommands());
// get block for custom blocks
if ($block["custom"])
{
include_once("./".self::$locations[$gui_class]."classes/".
"class.".$block_class.".php");
$app_block = new $block_class($block["id"]);
$block_gui->setBlock($app_block);
if (isset($block["ref_id"]))
{
$block_gui->setRefId($block["ref_id"]);
}
}
$ilCtrl->setParameter($this, "block_type", $block_gui->getBlockType());
$this->tpl->setCurrentBlock("col_block");
$ilBench->start("Column", "showBlocks-".$block_gui->getBlockType());
$html = $ilCtrl->getHTML($block_gui);
$ilBench->stop("Column", "showBlocks-".$block_gui->getBlockType());
// dummy block, if non visible, but movement is ongoing
if ($html == "" && $this->getRepositoryMode() &&
$this->getMovementMode())
{
include_once("./Services/Block/classes/class.ilDummyBlockGUI.php");
$bl = new ilDummyBlockGUI();
$bl->setBlockId($block["id"]);
$bl->setBlockType($block["type"]);
$bl->setTitle($lng->txt("invisible_block"));
$bl->setConfigMode($this->getMovementMode());
$html = $bl->getHTML();
}
// don't render a block if it's empty
if ($html != "")
{
$this->tpl->setVariable("BLOCK", $html);
$this->tpl->parseCurrentBlock();
$ilCtrl->setParameter($this, "block_type", "");
}
// count (moveable) blocks
if ($block["type"] != "pdsysmess" && $block["type"] != "pdfeedb" &&
$block["type"] != "news")
{
$i++;
}
else
{
$sum_moveable--;
}
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilColumnGUI::updateBlock ( )

Update Block (asynchronous)

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

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

{
global $ilCtrl, $ilBench;
$this->determineBlocks();
$i = 1;
$sum_moveable = count($this->blocks[$this->getSide()]);
foreach ($this->blocks[$this->getSide()] as $block)
{
include_once("./".self::$locations[$block["class"]]."classes/".
"class.".$block["class"].".php");
// set block id to context obj id,
// if block is not a custom block and context is not personal desktop
if (!$block["custom"] && $ilCtrl->getContextObjType() != "" && $ilCtrl->getContextObjType() != "user")
{
$block["id"] = $ilCtrl->getContextObjId();
}
//if (is_int(strpos($_GET["block_id"], "block_".$block["type"]."_".$block["id"])))
if ($_GET["block_id"] == "block_".$block["type"]."_".$block["id"])
{
$gui_class = $block["class"];
$block_class = substr($block["class"], 0, strlen($block["class"])-3);
$block_gui = new $gui_class();
$block_gui->setProperties($this->block_property[$block["type"]]);
$block_gui->setRepositoryMode($this->getRepositoryMode());
$block_gui->setEnableEdit($this->getEnableEdit());
$block_gui->setAdminCommands($this->getAdminCommands());
// get block for custom blocks
if ($block["custom"])
{
include_once("./".self::$locations[$gui_class]."classes/".
"class.".$block_class.".php");
$app_block = new $block_class($block["id"]);
$block_gui->setBlock($app_block);
$block_gui->setRefId($block["ref_id"]);
}
$ilCtrl->setParameter($this, "block_type", $block["type"]);
echo $ilCtrl->getHTML($block_gui);
$ilBench->save();
}
// count (moveable) blocks
if ($block["type"] != "pdsysmess" && $block["type"] != "pdfeedb"
&& $block["type"] != "news")
{
$i++;
}
else
{
$sum_moveable--;
}
}
echo "Error: ilColumnGUI::updateBlock: Block '".
$_GET["block_id"]."' unknown.";
}

+ Here is the call graph for this function:

Field Documentation

ilColumnGUI::$action_menu
protected

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

Referenced by getActionMenu(), and setActionMenu().

ilColumnGUI::$admincommands = null
protected

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

Referenced by getAdminCommands().

ilColumnGUI::$block_property = array()
protected

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

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",
"ilHtmlBlockGUI" => "html",
'ilPDTaggingBlockGUI' => 'pdtag',
'ilChatroomBlockGUI' => 'chatviewer',
'ilPollBlockGUI' => 'poll'
)

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

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

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

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

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

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

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

ilColumnGUI::$default_blocks
protected
Initial value:
array(
"cat" => array("ilNewsForContextBlockGUI" => IL_COL_RIGHT),
"crs" => array(
"ilNewsForContextBlockGUI" => IL_COL_RIGHT,
"ilCalendarBlockGUI" => IL_COL_RIGHT
),
"grp" => array(
"ilNewsForContextBlockGUI" => IL_COL_RIGHT,
"ilCalendarBlockGUI" => IL_COL_RIGHT),
"frm" => array("ilNewsForContextBlockGUI" => IL_COL_RIGHT),
"root" => array(),
"info" => array(
"ilNewsForContextBlockGUI" => IL_COL_RIGHT),
"pd" => array(
"ilPDCalendarBlockGUI" => IL_COL_RIGHT,
"ilPDSysMessageBlockGUI" => IL_COL_LEFT,
"ilPDNewsBlockGUI" => IL_COL_LEFT,
"ilPDSelectedItemsBlockGUI" => IL_COL_CENTER,
"ilPDMailBlockGUI" => IL_COL_RIGHT,
"ilPDNotesBlockGUI" => IL_COL_RIGHT,
"ilUsersOnlineBlockGUI" => IL_COL_RIGHT,
"ilBookmarkBlockGUI" => IL_COL_RIGHT,
"ilPDTaggingBlockGUI" => IL_COL_RIGHT,
"ilChatroomBlockGUI" => IL_COL_RIGHT
)
)

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

ilColumnGUI::$enableedit = false
protected

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

Referenced by getEnableEdit().

ilColumnGUI::$enablemovement = false
protected

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

Referenced by getEnableMovement().

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/",
"ilBookmarkBlockGUI" => "Services/Bookmarks/",
"ilPDNewsBlockGUI" => "Services/News/",
"ilExternalFeedBlockGUI" => "Services/Block/",
"ilPDExternalFeedBlockGUI" => "Services/Feeds/",
"ilHtmlBlockGUI" => "Services/Block/",
'ilPDTaggingBlockGUI' => 'Services/Tagging/',
'ilChatroomBlockGUI' => 'Modules/Chatroom/',
'ilPollBlockGUI' => 'Modules/Poll/'
)

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

ilColumnGUI::$movementmode = null
protected

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

Referenced by getMovementMode().

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

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

ilColumnGUI::$repositoryitems = array()
protected

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

Referenced by getRepositoryItems().

ilColumnGUI::$repositorymode = false
protected

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

Referenced by getRepositoryMode().

ilColumnGUI::$side = IL_COL_RIGHT
protected

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

Referenced by determineBlocks(), and getSide().

ilColumnGUI::$type
protected

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

Referenced by determineBlocks().


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