You are here

function agenda_block_view in Agenda 7

Same name and namespace in other branches
  1. 7.2 agenda.module \agenda_block_view()

Implements hook_block_view().

File

./agenda.module, line 101

Code

function agenda_block_view($delta) {

  // Load the block and do a sanity check
  $markup = agenda_display_block($delta);
  if (!$markup) {
    return FALSE;
  }

  // Render it
  $basepath = drupal_get_path('module', 'agenda');
  return array(
    'subject' => t('Agenda'),
    'content' => array(
      '#markup' => $markup,
      '#attached' => array(
        'css' => array(
          $basepath . '/agenda.css',
        ),
        'js' => array(
          $basepath . '/agenda.js',
        ),
      ),
    ),
  );
}