function auto_block_scheduler_get_bid in Auto Block Scheduler 7
Method used to fetch bid by module and delta values.
Parameters
string $module: Module name.
string $delta: Delta value.
Return value
array Associate array of theme and blockid.
3 calls to auto_block_scheduler_get_bid()
- auto_block_scheduler_display_scheduler_submit in ./
auto_block_scheduler.module - Form submission handler for admin block display section.
- auto_block_scheduler_option_for_block in ./
auto_block_scheduler.module - It is used to add scheduler option in block create/edit form.
- _auto_block_scheduler_configure_submit in ./
auto_block_scheduler.module - Form submission handler for block admin configuration.
File
- ./
auto_block_scheduler.module, line 394 - Scheduler publishes and unpublishes block on dates specified by the user.
Code
function auto_block_scheduler_get_bid($module, $delta) {
$results = array();
$query_results = db_select('block', 'b')
->fields('b', array(
'bid',
'theme',
))
->condition('module', $module)
->condition('delta', $delta)
->execute()
->fetchAll();
if (count($query_results)) {
foreach ($query_results as $key => $value) {
$results[$query_results[$key]->theme] = $query_results[$key]->bid;
}
}
return $results;
}