You are here

function _simplenews_get_blocks in Simplenews 7

Same name and namespace in other branches
  1. 7.2 simplenews.install \_simplenews_get_blocks()

Helper function to get all activated simplenews blocks

Return value

Keyed array of simplenews blocks.

1 call to _simplenews_get_blocks()
simplenews_update_7000 in ./simplenews.install
Create table {simplenews_category} to replace taxonomy terms. Migrate Newsletter taxonomy data to Newsletter categories.

File

./simplenews.install, line 456
Install, update and uninstall functions for the simplenews module

Code

function _simplenews_get_blocks() {
  $query = db_select('block', 'b');
  $result = $query
    ->fields('b', array(
    'delta',
  ))
    ->condition('b.status', 1)
    ->condition('b.module', 'simplenews')
    ->execute();
  return $result
    ->fetchAllAssoc('delta');
}