function context_ui_block in Context 5
Same name and namespace in other branches
- 6.3 context_ui/context_ui.module \context_ui_block()
- 6 context_ui/context_ui.module \context_ui_block()
- 6.2 context_ui/context_ui.module \context_ui_block()
Implementation of hook_block().
File
- context_ui/
context_ui.module, line 6
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;
}
}