You are here

function i18n_book_navigation_block in Book translation 6.2

Same name and namespace in other branches
  1. 6 i18n_book_navigation.module \i18n_book_navigation_block()

Implementation of hook_block()

File

./i18n_book_navigation.module, line 102
Defines the i18n book navigation module. Contains all necessary data and hooks

Code

function i18n_book_navigation_block($op = 'list', $delta = 0, $edit = array()) {
  switch ($op) {
    case 'view':
      return _i18n_book_navigation_block(menu_get_object());
    case 'list':
      $block = array(
        array(
          'info' => t('i18n Book Navigation'),
          'cache' => BLOCK_CACHE_PER_PAGE | BLOCK_CACHE_PER_ROLE,
        ),
      );
      return $block;

    // Configure and save is identical to book_block()
    case 'configure':
    case 'save':
      return book_block($op, $delta, $edit);
  }
}