function LanguageTestHooks::languageTypesInfo

Implements hook_language_types_info().

Attributes

#[Hook('language_types_info')]

File

core/modules/language/tests/language_test/src/Hook/LanguageTestHooks.php, line 36

Class

LanguageTestHooks
Hook implementations for language_test.

Namespace

Drupal\language_test\Hook

Code

public function languageTypesInfo() : array {
  if (\Drupal::keyValue('language_test')->get('language_types')) {
    return [
      'test_language_type' => [
        'name' => $this->t('Test'),
        'description' => $this->t('A test language type.'),
      ],
      'fixed_test_language_type' => [
        'fixed' => [
          'test_language_negotiation_method',
        ],
        'locked' => TRUE,
      ],
    ];
  }
  return [];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.