ILIAS  Release_5_0_x_branch Revision 61816
 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 155 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 809 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 826 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 171 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 186 of file class.ilColumnGUI.php.

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

Determine which blocks to show.

Definition at line 851 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");
$custom_block = new ilCustomBlock();
$custom_block->setContextObjId($ilCtrl->getContextObjId());
$custom_block->setContextObjType($ilCtrl->getContextObjType());
$c_blocks = $custom_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"]);
}
}
}
// repository object custom blocks
include_once("./Services/Block/classes/class.ilCustomBlock.php");
$custom_block = new ilCustomBlock();
$custom_block->setContextObjId($ilCtrl->getContextObjId());
$custom_block->setContextObjType($ilCtrl->getContextObjType());
$c_blocks = $custom_block->queryBlocksForContext(false); // get all sub-object types
foreach($c_blocks as $c_block)
{
$type = $c_block["type"];
$class = array_search($type, self::$block_types);
if($class)
{
$nr = $def_nr++;
$this->blocks[$side][] = array(
"nr" => $nr,
"class" => $class,
"type" => $type,
"id" => $c_block["id"],
"custom" => true);
}
}
}
$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 1094 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 422 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 1182 of file class.ilColumnGUI.php.

References $action_menu.

{
}
ilColumnGUI::getAdminCommands ( )

Get Administration Commmands.

Returns
boolean Administration Commmands

Definition at line 296 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 389 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 196 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 216 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 256 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 336 of file class.ilColumnGUI.php.

References $enablemovement.

{
}
ilColumnGUI::getHTML ( )

Get HTML for column.

Definition at line 474 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 316 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 414 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 276 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 344 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 236 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 1033 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();
}
elseif($a_type == "tagcld")
{
$tags_active = new ilSetting("tags");
return (bool)$tags_active->get("enable", false);
}
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 1173 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 286 of file class.ilColumnGUI.php.

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

Definition at line 394 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 384 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 206 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 246 of file class.ilColumnGUI.php.

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

Set Enable Movement.

Parameters
boolean$a_enablemovementEnable Movement

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

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

Set Movement Mode.

Parameters
boolean$a_movementmodeMovement Mode

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

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

Set Repository Items.

Parameters
array$a_repositoryitemsRepository Items

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

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

Set RepositoryMode.

Parameters
boolean$a_repositorymodeRepositoryMode

Definition at line 266 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 226 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 505 of file class.ilColumnGUI.php.

References $ilBench, $ilCtrl, $ilUser, $lng, $path, 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"])
{
$path = "./".self::$locations[$gui_class]."classes/".
"class.".$block_class.".php";
if(file_exists($path))
{
include_once($path);
$app_block = new $block_class($block["id"]);
}
else
{
// we only need generic block
$app_block = new ilCustomBlock($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 740 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",
'ilPDTaggingBlockGUI' => 'pdtag',
'ilChatroomBlockGUI' => 'chatviewer',
'ilPollBlockGUI' => 'poll',
'ilClassificationBlockGUI' => 'clsfct',
)

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,
"tagcld" => true)

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

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

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

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

ilColumnGUI::$default_blocks
protected

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/",
'ilPDTaggingBlockGUI' => 'Services/Tagging/',
'ilChatroomBlockGUI' => 'Modules/Chatroom/',
'ilPollBlockGUI' => 'Modules/Poll/',
'ilClassificationBlockGUI' => 'Services/Classification/',
)

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: