You are here

function calendar_block in Calendar 6.2

Same name and namespace in other branches
  1. 5.2 calendar.module \calendar_block()
  2. 5 calendar.module \calendar_block()

implementation of hook_block()

4 string references to 'calendar_block'
calendar_plugin_display_attachment::attach_to in includes/calendar_plugin_display_attachment.inc
Attach only the appropriate displays for the current argument.
calendar_uninstall in ./calendar.install
Implementation of hook_uninstall(). Remove all traces of calendars.
calendar_update_6002 in ./calendar.install
calendar_views_construct in includes/calendar.views_default.inc
Construct a default calendar to match specified options. Views calls it without options, so the basic default view will use the default values.

File

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

Code

function calendar_block($op = 'list', $delta = 0) {
  switch ($op) {
    case 'list':
      $blocks[0]['info'] = t('Calendar Legend.');
      return $blocks;
      break;
    case 'view':
      switch ($delta) {
        case 0:
          $block['subject'] = t('Calendar Legend');
          $content = theme('calendar_stripe_legend');
          $block['content'] = !empty($content) ? '<div class="calendar legend">' . $content . '</div>' : '';
          return $block;
      }
  }
}