You are here

function elfinder_block in elFinder file manager 6

Same name and namespace in other branches
  1. 6.2 elfinder.module \elfinder_block()

Implements hook_block().

File

./elfinder.module, line 771

Code

function elfinder_block($op = 'list', $delta = 0, $edit = array()) {
  switch ($op) {
    case 'list':
      $blocks[0] = array(
        'info' => t('File manager'),
        'cache' => BLOCK_CACHE_PER_USER,
      );
      return $blocks;
    case 'configure':
      $form = array();
      return $form;
    case 'view':
      switch ($delta) {
        case 0:
          if (user_access('use file manager')) {
            $block['subject'] = t('File manager');
            $block['content'] = elfinder_file_browser('backend');
            return $block;
          }
          break;
      }
  }
}