You are here

function rotating_banner_block_view in Rotating Banner 7.2

Same name and namespace in other branches
  1. 7 rotating_banner.module \rotating_banner_block_view()

Implements hook_block_view().

File

./rotating_banner.module, line 412

Code

function rotating_banner_block_view($delta) {
  $rbid = $delta;
  $banner = rotating_banner_load($rbid);
  $slides = $banner
    ->getSlides();
  $content = theme('rotating_banner', array(
    'banner' => $banner,
    'slides' => $slides,
  ));

  // We wrap this in another array so the #prefix and #suffix in theme_rotating_banner
  // do not end up before and after the block... Basically D7 theming kills me.
  return array(
    'content' => array(
      $content,
    ),
  );
}