function linkchecker_block_custom_block_get in Link checker 7
Returns information from database about a user-created (custom) block.
Parameters
int $bid: ID of the block to get information for.
Return value
object Associative object of information stored in the database for this block. Object keys:
- module: 'block' as the source of the custom blocks data.
- delta: Block ID.
- info: Block description.
- body['value']: Block contents.
- body['format']: Filter ID of the filter format for the body.
3 calls to linkchecker_block_custom_block_get()
- _linkchecker_batch_import_block_custom_op in ./
linkchecker.batch.inc - Batch operation: Scan one by one block for links.
- _linkchecker_batch_single_block_custom_import_op in ./
linkchecker.batch.inc - Run single block link extraction.
- _linkchecker_status_handling in ./
linkchecker.module - Status code handling.
File
- ./
linkchecker.module, line 1150 - This module periodically check links in given node types, blocks etc.
Code
function linkchecker_block_custom_block_get($bid) {
$block_custom = block_custom_block_get($bid);
if ($block_custom) {
$block = new stdClass();
$block->module = 'block';
$block->delta = $block_custom['bid'];
$block->info = $block_custom['info'];
$block->body = array();
$block->body['value'] = $block_custom['body'];
$block->body['format'] = $block_custom['format'];
}
else {
$block = FALSE;
}
return $block;
}