ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilBlockSetting Class Reference

Block Setting class. More...

+ Collaboration diagram for ilBlockSetting:

Static Public Member Functions

static _lookup ($a_type, $a_setting, $a_user=0, $a_block_id=0)
 Lookup setting from database.
static _write ($a_type, $a_setting, $a_value, $a_user=0, $a_block_id=0)
 Write setting to database.
static _lookupDetailLevel ($a_type, $a_user=0, $a_block_id=0)
 Lookup detail level.
static _writeDetailLevel ($a_type, $a_value, $a_user=0, $a_block_id=0)
 Write detail level to database.
static _lookupNr ($a_type, $a_user=0, $a_block_id=0)
 Lookup number.
static _writeNumber ($a_type, $a_value, $a_user=0, $a_block_id=0)
 Write number to database.
static _lookupSide ($a_type, $a_user=0, $a_block_id=0)
 Lookup side.
static _writeSide ($a_type, $a_value, $a_user=0, $a_block_id=0)
 Write side to database.
static _deleteSettingsOfUser ($a_user)
 Delete block settings of user.
static _deleteSettingsOfBlock ($a_block_id, $a_block_type)
 Delete block settings of block.

Detailed Description

Block Setting class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Member Function Documentation

static ilBlockSetting::_deleteSettingsOfBlock (   $a_block_id,
  $a_block_type 
)
static

Delete block settings of block.

Definition at line 159 of file class.ilBlockSetting.php.

Referenced by ilObjExternalFeed\delete(), and ilObject\delete().

{
global $ilDB;
if ($a_block_id > 0)
{
$query = "DELETE FROM il_block_setting WHERE block_id = ".
$ilDB->quote($a_block_id).
" AND type = ".$ilDB->quote($a_block_type);
$ilDB->query($query);
}
}

+ Here is the caller graph for this function:

static ilBlockSetting::_deleteSettingsOfUser (   $a_user)
static

Delete block settings of user.

Definition at line 142 of file class.ilBlockSetting.php.

Referenced by ilObjUser\delete().

{
global $ilDB;
if ($a_user > 0)
{
$query = "DELETE FROM il_block_setting WHERE user = ".
$ilDB->quote($a_user);
$ilDB->query($query);
}
}

+ Here is the caller graph for this function:

static ilBlockSetting::_lookup (   $a_type,
  $a_setting,
  $a_user = 0,
  $a_block_id = 0 
)
static

Lookup setting from database.

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

References DB_FETCHMODE_ASSOC.

Referenced by ilNewsItem\_getDefaultVisibilityForRefId(), _lookupDetailLevel(), _lookupNr(), _lookupSide(), ilNewsItem\_lookupUserPDPeriod(), ilNewsForContextTableGUI\fillRow(), ilPDNewsTableGUI\fillRow(), ilNewsForContextBlockGUI\getHTML(), ilNewsItem\getNewsForRefId(), ilNewsForContextBlockGUI\handleView(), ilObjectFeedWriter\ilObjectFeedWriter(), ilObjMediaCastGUI\initSettingsForm(), ilNewsForContextBlockGUI\initSettingsForm(), ilObjMediaCastGUI\listItemsObject(), ilNewsItem\queryNewsForContext(), ilNewsItem\queryNewsForMultipleContexts(), and ilNewsForContextBlockGUI\showNews().

{
global $ilDB;
$query = "SELECT * FROM il_block_setting WHERE type = ".
$ilDB->quote($a_type)." AND user = ".
$ilDB->quote($a_user)." AND setting = ".
$ilDB->quote($a_setting)." AND block_id = ".
$ilDB->quote($a_block_id);
$set = $ilDB->query($query);
if ($rec = $set->fetchRow(DB_FETCHMODE_ASSOC))
{
return $rec["value"];
}
else
{
return false;
}
}

+ Here is the caller graph for this function:

static ilBlockSetting::_lookupDetailLevel (   $a_type,
  $a_user = 0,
  $a_block_id = 0 
)
static

Lookup detail level.

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

References _lookup().

Referenced by ilColumnGUI\addHiddenBlockSelector(), ilBlockGUI\handleDetailLevel(), ilColumnGUI\moveBlock(), and ilColumnGUI\showBlocks().

{
$detail = ilBlockSetting::_lookup($a_type, "detail", $a_user, $a_block_id);
if ($detail === false) // return a level of 2 (standard value)
{ // if record does not exist
return 2;
}
else
{
return $detail;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilBlockSetting::_lookupNr (   $a_type,
  $a_user = 0,
  $a_block_id = 0 
)
static

Lookup number.

Definition at line 102 of file class.ilBlockSetting.php.

References _lookup().

Referenced by ilColumnGUI\determineBlocks().

{
$nr = ilBlockSetting::_lookup($a_type, "nr", $a_user, $a_block_id);
return $nr;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilBlockSetting::_lookupSide (   $a_type,
  $a_user = 0,
  $a_block_id = 0 
)
static

Lookup side.

Definition at line 122 of file class.ilBlockSetting.php.

References _lookup().

Referenced by ilColumnGUI\determineBlocks().

{
$side = ilBlockSetting::_lookup($a_type, "side", $a_user, $a_block_id);
return $side;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilBlockSetting::_write (   $a_type,
  $a_setting,
  $a_value,
  $a_user = 0,
  $a_block_id = 0 
)
static

Write setting to database.

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

Referenced by _writeDetailLevel(), _writeNumber(), _writeSide(), ilObjFile\createProperties(), ilObjForum\createSettings(), ilNewsForContextBlockGUI\hideNotifications(), ilPDNewsBlockGUI\saveSettings(), ilNewsForContextBlockGUI\saveSettings(), ilObjMediaCastGUI\saveSettingsObject(), and ilNewsForContextBlockGUI\showNotifications().

{
global $ilDB;
$query = "REPLACE INTO il_block_setting (type, user, setting, block_id, value) VALUES (".
$ilDB->quote($a_type).", ".$ilDB->quote($a_user).",".
$ilDB->quote($a_setting).",".$ilDB->quote($a_block_id).",".$ilDB->quote($a_value).")";
$ilDB->query($query);
}

+ Here is the caller graph for this function:

static ilBlockSetting::_writeDetailLevel (   $a_type,
  $a_value,
  $a_user = 0,
  $a_block_id = 0 
)
static

Write detail level to database.

Definition at line 93 of file class.ilBlockSetting.php.

References _write().

Referenced by ilColumnGUI\activateBlock(), and ilBlockGUI\handleDetailLevel().

{
ilBlockSetting::_write($a_type, "detail", $a_value, $a_user, $a_block_id);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilBlockSetting::_writeNumber (   $a_type,
  $a_value,
  $a_user = 0,
  $a_block_id = 0 
)
static

Write number to database.

Definition at line 113 of file class.ilBlockSetting.php.

References _write().

Referenced by ilColumnGUI\moveBlock().

{
ilBlockSetting::_write($a_type, "nr", $a_value, $a_user, $a_block_id);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilBlockSetting::_writeSide (   $a_type,
  $a_value,
  $a_user = 0,
  $a_block_id = 0 
)
static

Write side to database.

Definition at line 133 of file class.ilBlockSetting.php.

References _write().

Referenced by ilColumnGUI\moveBlock().

{
ilBlockSetting::_write($a_type, "side", $a_value, $a_user, $a_block_id);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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