You are here

function finder_block_view in Finder 7

Same name and namespace in other branches
  1. 7.2 finder.module \finder_block_view()

Implements hook_block_view().

See also

hook_block_view()

File

./finder.module, line 799
The finder module.

Code

function finder_block_view($delta = '') {
  if (user_access('use finder')) {
    $finder_id = str_replace('finder_', '', $delta);
    $finder = finder_load($finder_id);
    if ($finder) {
      finder_invoke_finderapi($finder, 'finder_block');
      $block = array(
        'subject' => check_plain($finder->title),
        'content' => array(
          '#theme' => 'finder_block',
          '#finder' => $finder,
        ),
      );
      return $block;
    }
  }
}