You are here

function akamai_block in Akamai 6.2

Same name and namespace in other branches
  1. 6 akamai.module \akamai_block()

Implements hook_block().

File

./akamai.module, line 87
Integration with the Akamai CDN Cache Control Web Service.

Code

function akamai_block($op = 'list', $delta = 0, $edit = array()) {
  if ($op == 'list') {
    $blocks[0] = array(
      'info' => t('Akamai Cache Control'),
      'region' => 'footer',
      'weight' => 0,
      'cache' => BLOCK_NO_CACHE,
    );
    return $blocks;
  }
  elseif ($op == 'view') {
    $cache_control_form = drupal_get_form('akamai_page_cache_control_form');
    $block = array(
      'subject' => t('Akamai Cache Control'),
      'content' => $content = theme('akamai_page_cache_control_block', $cache_control_form),
    );
    return $block;
  }
}