You are here

class LanguageNegotiationTestTs in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTestTs.php \Drupal\language_test\Plugin\LanguageNegotiation\LanguageNegotiationTestTs

Class for identifying language from a selected language.

Plugin annotation


@LanguageNegotiation(
  id = "test_language_negotiation_method_ts",
  weight = -10,
  name = @Translation("Type-specific test"),
  description = @Translation("This is a test language negotiation method."),
  types = {"test_language_type"}
)

Hierarchy

Expanded class hierarchy of LanguageNegotiationTestTs

File

core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTestTs.php, line 16

Namespace

Drupal\language_test\Plugin\LanguageNegotiation
View source
class LanguageNegotiationTestTs extends LanguageNegotiationTest {

  /**
   * The language negotiation method id.
   */
  const METHOD_ID = 'test_language_negotiation_method_ts';

}

Members

Namesort descending Modifiers Type Description Overrides
LanguageNegotiationMethodBase::$config protected property The configuration factory.
LanguageNegotiationMethodBase::$currentUser protected property The current active user.
LanguageNegotiationMethodBase::$languageManager protected property The language manager.
LanguageNegotiationMethodBase::persist public function Notifies the plugin that the language code it returned has been accepted. Overrides LanguageNegotiationMethodInterface::persist 1
LanguageNegotiationMethodBase::setConfig public function Injects the configuration factory. Overrides LanguageNegotiationMethodInterface::setConfig
LanguageNegotiationMethodBase::setCurrentUser public function Injects the current user. Overrides LanguageNegotiationMethodInterface::setCurrentUser
LanguageNegotiationMethodBase::setLanguageManager public function Injects the language manager. Overrides LanguageNegotiationMethodInterface::setLanguageManager
LanguageNegotiationTest::getLangcode public function Performs language negotiation. Overrides LanguageNegotiationMethodInterface::getLangcode
LanguageNegotiationTestTs::METHOD_ID constant The language negotiation method id. Overrides LanguageNegotiationTest::METHOD_ID