You are here

function language_selection_page_block_view in Language Selection Page 7

Same name and namespace in other branches
  1. 7.2 language_selection_page.module \language_selection_page_block_view()

Implements hook_block_view().

File

./language_selection_page.module, line 186

Code

function language_selection_page_block_view($delta = '') {
  if (LANGUAGE_SELECTION_PAGE_BLOCK != variable_get('language_selection_page_redirect_type', LANGUAGE_SELECTION_PAGE_TEMPLATE_ONLY)) {
    return array();
  }
  module_load_include('inc', 'language_selection_page', 'language_selection_page.pages');
  if (!($data = language_selection_page_selection_page_data())) {
    return array();
  }
  $block = array();
  switch ($delta) {
    case 'block':
      $block['subject'] = '';
      $block['content'] = array(
        '#theme' => 'language_selection_page_body',
        '#language_selection_page' => $data,
        'blop' => 'blap',
      );
      break;
  }
  return $block;
}