function locale_test_language_negotiation_info

7.x locale_test.module locale_test_language_negotiation_info()

Implements hook_language_negotiation_info().

1 string reference to 'locale_test_language_negotiation_info'
LocaleLanguageNegotiationInfoFunctionalTest::testInfoAlterations in drupal-7.x/modules/locale/locale.test
Tests alterations to language types/negotiation info.

File

drupal-7.x/modules/locale/tests/locale_test.module, line 85
Mock module for locale layer tests.

Code

function locale_test_language_negotiation_info() {
  if (variable_get('locale_test_language_negotiation_info', FALSE)) {
    $info = array(
      'callbacks' => array(
        'language' => 'locale_test_language_provider',
      ),
      'file' => drupal_get_path('module', 'locale_test') . '/locale_test.module',
      'weight' => -10,
      'description' => t('This is a test language provider.'),
    );

    return array(
      'test_language_provider' => array(
        'name' => t('Test'),
        'types' => array(LANGUAGE_TYPE_CONTENT, 'test_language_type', 'fixed_test_language_type'),
      ) + $info,
      'test_language_provider_ts' => array(
        'name' => t('Type-specific test'),
        'types' => array('test_language_type'),
      ) + $info,
    );
  }
}