You are here

function context_ui_block in Context 6.2

Same name and namespace in other branches
  1. 5 context_ui/context_ui.module \context_ui_block()
  2. 6.3 context_ui/context_ui.module \context_ui_block()
  3. 6 context_ui/context_ui.module \context_ui_block()

Implementation of hook_block().

1 string reference to 'context_ui_block'
context_update_6003 in ./context.install
Remove deprecated tables from context_ui.

File

context_ui/context_ui.module, line 41

Code

function context_ui_block($op = 'list', $delta = 0, $edit = array()) {
  switch ($op) {
    case 'list':
      $blocks = array();
      $blocks['devel']['info'] = t('Context Devel');
      return $blocks;
    case 'view':
      switch ($delta) {
        case 'devel':
          $block = array();
          $block['subject'] = t('Context Devel');
          if ($context = context_get()) {
            $output = theme('context_devel', $context);
            $block['content'] = $output;
          }
          else {
            $block['content'] = "<p>" . t('No context information is set.') . "</p>";
          }
          return $block;
      }
      break;
  }
}