You are here

function campaignmonitor_block in Campaign Monitor 6.3

Same name and namespace in other branches
  1. 5.2 campaignmonitor.module \campaignmonitor_block()
  2. 5 campaignmonitor.module \campaignmonitor_block()
  3. 6 campaignmonitor.module \campaignmonitor_block()
  4. 6.2 campaignmonitor.module \campaignmonitor_block()

Implementation of hook_block().

File

./campaignmonitor.module, line 165
Module that plugs in Campaign Monitor functionality to your Drupal web site. For Campaign Monitor information see: http://www.campaignmonitor.com/

Code

function campaignmonitor_block($op = 'list', $delta = 0, $edit = array()) {
  switch ($op) {
    case 'list':
      return campaignmonitor_block_list();
    case 'configure':
    case 'save':

      // no additional configuration options
      break;
    case 'view':
    default:
      $lists = campaignmonitor_get_available_lists();
      $list = $lists[$delta];
      $block['subject'] = $list->name;
      $block['content'] = theme('campaignmonitor_block_content', $delta);
      return $block;
  }
}