You are here

function agenda_block_info in Agenda 7.2

Same name and namespace in other branches
  1. 7 agenda.module \agenda_block_info()

Implements hook_block_info().

File

./agenda.module, line 142

Code

function agenda_block_info() {
  $res = db_query("SELECT bid, value FROM {agenda} WHERE name = :name", array(
    ':name' => 'title',
  ));
  $blocks = array();
  while ($block = $res
    ->fetchObject()) {
    $blocks[$block->bid] = array(
      'info' => t('Agenda: @title', array(
        '@title' => agenda_variable_get($block->bid, 'title', 'New block'),
      )),
      'cache' => DRUPAL_CACHE_GLOBAL,
    );
  }
  return $blocks;
}