You are here

function advpoll_block_view in Advanced Poll 7.3

Same name and namespace in other branches
  1. 7 advpoll.module \advpoll_block_view()
  2. 7.2 advpoll.module \advpoll_block_view()

Implements hook_block_view().

File

./advpoll.module, line 225

Code

function advpoll_block_view($delta = '') {
  $block = array();
  switch ($delta) {
    case 'advpoll_recent':
      $recent = advpoll_get_recent();
      $block['subject'] = t('Most Recent Poll');
      if ($recent) {
        $block['content'] = array(
          '#markup' => $recent,
        );
      }
      break;
    default:
      $block = advpoll_generate_block_view($block, $delta);
      break;
  }
  return $block;
}