You are here

function rave_alerts_block_view in RAVE Alerts 7

Same name and namespace in other branches
  1. 1.0.x rave_alerts.module \rave_alerts_block_view()

Implements hook_block_view().

File

./rave_alerts.module, line 78
CU Alerts module

Code

function rave_alerts_block_view($delta = '') {
  $block = array();
  switch ($delta) {
    case 'rave_alerts':
      $data = rave_alerts_remote_data();
      $block['content'] = array(
        '#theme' => 'rave_alerts_alerts',
        '#data' => $data,
        '#attached' => array(
          'js' => array(
            drupal_get_path('module', 'rave_alerts') . "/js/rave_alerts.js",
          ),
        ),
      );
      break;
  }
  return $block;
}