Same name in other branches
  1. 7.x-3.x quicktabs.module \quicktabs_block_view()
  2. 8.x-1.x quicktabs.module \quicktabs_block_view()

Implements hook_block_view().

File

./quicktabs.module, line 147

Code

function quicktabs_block_view($delta = '') {
    $block = array();
    if ($quicktabs = quicktabs_load($delta)) {
        $qt = quicktabs_render($quicktabs);
        $block['subject'] = $quicktabs->title;
        $block['content'] = $qt;
        if (!empty($block['content'])) {
            $block['content']['#contextual_links']['quicktabs'] = array(
                'admin/structure/quicktabs/manage',
                array(
                    $delta,
                ),
            );
        }
    }
    return $block;
}