You are here

function shurly_service_block_view in ShURLy 7

Same name and namespace in other branches
  1. 8 shurly_service/shurly_service.module \shurly_service_block_view()

Implements hook_block_view().

File

shurly_service/shurly_service.module, line 73
Link ShURLy functionalities to services module. @todo

Code

function shurly_service_block_view($delta = '') {
  $block = array();

  // don't show the block when user is on the callback page
  switch ($delta) {
    case 'api_key':
      global $user;
      if ($user->uid > 0 && user_access('Create short URLs')) {
        $block['subject'] = t('API key');
        $block['content'] = drupal_get_form('shurly_api_key_form');
      }
      break;
  }
  return $block;
}