You are here

function context_ui_block_view in Context 7.3

Implementation of hook_block_view().

File

context_ui/context_ui.module, line 53

Code

function context_ui_block_view($delta = '') {
  switch ($delta) {
    case 'editor':
      if (user_access('administer contexts') && strpos($_GET['q'], 'admin/structure/context') === FALSE && ($contexts = context_active_contexts())) {
        return array(
          'subject' => t('Context editor'),
          'content' => drupal_get_form('context_ui_editor', $contexts),
        );
      }
      break;
    case 'devel':
      if (module_exists('devel') && ($all = context_get())) {
        return array(
          'subject' => t('Context inspector'),
          'content' => kdevel_print_object($all),
        );
      }
      break;
  }
}