function language_test_language_negotiation_info

Implements hook_language_negotiation_info().

File

drupal/core/modules/language/tests/language_test.module, line 59
Mock module for language layer tests.

Code

function language_test_language_negotiation_info() {
  if (state()
    ->get('language_test.language_negotiation_info')) {
    $info = array(
      'callbacks' => array(
        'negotiation' => 'language_test_language_negotiation_method',
      ),
      'file' => drupal_get_path('module', 'language_test') . '/language_test.module',
      'weight' => -10,
      'description' => t('This is a test language negotiation method.'),
    );
    return array(
      'test_language_negotiation_method' => array(
        'name' => t('Test'),
        'types' => array(
          LANGUAGE_TYPE_CONTENT,
          'test_language_type',
          'fixed_test_language_type',
        ),
      ) + $info,
      'test_language_negotiation_method_ts' => array(
        'name' => t('Type-specific test'),
        'types' => array(
          'test_language_type',
        ),
      ) + $info,
    );
  }
}