Block Setting class. More...
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. | |
Block Setting class.
Definition at line 31 of file class.ilBlockSetting.php.
| 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.
Referenced by ilNewsItem::_getDefaultVisibilityForRefId(), _lookupDetailLevel(), _lookupNr(), _lookupSide(), ilNewsItem::_lookupUserPDPeriod(), ilPDNewsTableGUI::fillRow(), ilNewsForContextTableGUI::fillRow(), ilNewsForContextBlockGUI::getHTML(), ilNewsItem::getNewsForRefId(), ilNewsForContextBlockGUI::handleView(), ilObjectFeedWriter::ilObjectFeedWriter(), ilNewsForContextBlockGUI::initSettingsForm(), ilObjMediaCastGUI::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(), and ilColumnGUI::moveBlock().
{
$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::create(), 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:
1.7.1