You are here

function language_selection_page_block_view in Language Selection Page 7.2

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

Implements hook_block_view().

File

./language_selection_page.module, line 219

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', 'includes/language_selection_page.helpers');
  if (language_selection_page_is_negotiation_detected()) {
    return array();
  }
  $block = array();
  switch ($delta) {
    case 'block':
      $block['subject'] = '';
      $block['content'] = array(
        '#theme' => 'language_selection_page_body',
        '#language_selection_page' => language_selection_page_selection_page_data(),
      );
      break;
  }
  return $block;
}