You are here

function BlockCacheAlter::_checkBlockSetting in Block Cache Alter 6

Helper function to check a setting of a block directly from database.

Parameters

int $delta The delta of the block.:

string $field The name of the field to retrieve.:

Return value

int $cache The setting of the cache.

3 calls to BlockCacheAlter::_checkBlockSetting()
BlockCacheAlter::testPatchedBlockModule in ./blockcache_alter.test
Extra tests when the block module is patched.
BlockCacheAlter::testSimpleCacheChanges in ./blockcache_alter.test
Test simple cache changes.
BlockCacheAlter::testSimpleCacheRefreshments in ./blockcache_alter.test
Test simple cache changes with clear cache option (only block or page).

File

./blockcache_alter.test, line 68
Tests for Block Cache Alter

Class

BlockCacheAlter
@file Tests for Block Cache Alter

Code

function _checkBlockSetting($delta, $field = 'cache') {
  $setting = db_result(db_query("SELECT {$field} FROM {blocks} WHERE module = 'block' AND delta = '%s'", $delta));
  return $setting;
}