ILIAS  Release_4_0_x_branch Revision 61816
 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 165 of file class.ilBlockSetting.php.

References $ilDB.

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

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

+ Here is the caller graph for this function:

static ilBlockSetting::_deleteSettingsOfUser (   $a_user)
static

Delete block settings of user.

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

References $ilDB.

Referenced by ilObjUser\delete().

{
global $ilDB;
if ($a_user > 0)
{
$ilDB->manipulate("DELETE FROM il_block_setting WHERE user_id = ".
$ilDB->quote($a_user, "integer"));
}
}

+ 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 $ilDB.

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;
$set = $ilDB->query(sprintf("SELECT * FROM il_block_setting WHERE type = %s ".
"AND user_id = %s AND setting = %s AND block_id = %s",
$ilDB->quote($a_type, "text"),
$ilDB->quote($a_user, "integer"),
$ilDB->quote($a_setting, "text"),
$ilDB->quote($a_block_id, "integer")));
if ($rec = $ilDB->fetchAssoc($set))
{
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 83 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 110 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 130 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 62 of file class.ilBlockSetting.php.

References $ilDB.

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

{
global $ilDB;
$ilDB->manipulate(sprintf("DELETE FROM il_block_setting WHERE type = %s AND user_id = %s AND block_id = %s AND setting = %s",
$ilDB->quote($a_type, "text"),
$ilDB->quote($a_user, "integer"),
$ilDB->quote((int) $a_block_id, "integer"),
$ilDB->quote($a_setting, "text")));
$ilDB->manipulate(sprintf("INSERT INTO il_block_setting (type, user_id, setting, block_id, value) VALUES (%s,%s,%s,%s,%s)",
$ilDB->quote($a_type, "text"),
$ilDB->quote($a_user, "integer"),
$ilDB->quote($a_setting, "text"),
$ilDB->quote((int) $a_block_id, "integer"),
$ilDB->quote($a_value, "text")));
}

+ 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 101 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 121 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 141 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: