You are here

function calendar_block_view in Calendar 7.3

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

Implementation of hook_block_view().

File

./calendar.module, line 484
Adds calendar filtering and displays to Views.

Code

function calendar_block_view($delta = '') {
  switch ($delta) {
    case 'calendar_legend':

      // Create the content before returning the block
      // so empty content won't still create the block.
      $view = variable_get('calendar_legend_view_' . $delta, '');
      $content = theme('calendar_stripe_legend', array(
        'view' => $view,
      ));
      $block['subject'] = t('Calendar Legend');
      $block['content'] = $content;
      return $block;
  }
}