diff --git a/core/modules/language/src/Annotation/LanguageNegotiation.php b/core/modules/language/src/Annotation/LanguageNegotiation.php new file mode 100644 index 0000000000000000000000000000000000000000..92f767bb2a84c2d3e9f9642c387e86d8287f9263 --- /dev/null +++ b/core/modules/language/src/Annotation/LanguageNegotiation.php @@ -0,0 +1,82 @@ +cacheBackend = $cache_backend; $this->cacheKeyPrefix = 'language_negotiation_plugins'; $this->cacheKey = 'language_negotiation_plugins'; diff --git a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationBrowser.php b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationBrowser.php index 00c1fde606846eaae9a53ba370684c673f4f3f76..575d4f599f3161a06059c710f0c322ff52b491ad 100644 --- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationBrowser.php +++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationBrowser.php @@ -14,7 +14,7 @@ /** * Class for identifying language from the browser Accept-language HTTP header. * - * @Plugin( + * @LanguageNegotiation( * id = \Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationBrowser::METHOD_ID, * weight = -2, * name = @Translation("Browser"), diff --git a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSelected.php b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSelected.php index c4cd150b3b413de31a3b5231756be2a3182a2eea..142ce0e05acfcbfaafe0d7271864d9190fa44be2 100644 --- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSelected.php +++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSelected.php @@ -13,7 +13,7 @@ /** * Class for identifying language from a selected language. * - * @Plugin( + * @LanguageNegotiation( * id = Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationSelected::METHOD_ID, * weight = 12, * name = @Translation("Selected language"), diff --git a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSession.php b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSession.php index 0341ca0d35ca1e70b5ff0f82de82ebb5c1475832..fe9500a4a0ccf6ceef43ccc1cf81c6cd6cc2caab 100644 --- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSession.php +++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSession.php @@ -18,7 +18,7 @@ /** * Identify language from a request/session parameter. * - * @Plugin( + * @LanguageNegotiation( * id = Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationSession::METHOD_ID, * weight = -6, * name = @Translation("Session"), diff --git a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUI.php b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUI.php index 0935d1ed41c35d20bf1de8431626f010f8d09150..14c9f759deb6593d590fbd131222c003619f9c05 100644 --- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUI.php +++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUI.php @@ -13,7 +13,7 @@ /** * Identifies the language from the interface text language selected for page. * - * @Plugin( + * @LanguageNegotiation( * id = Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUI::METHOD_ID, * types = {Drupal\Core\Language\LanguageInterface::TYPE_CONTENT}, * weight = 9, diff --git a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php index 91f45b5b1cac3e4845b574112b3d64aff881bb3d..6ea4aee76e81ac279febd723923ccbc154749292 100644 --- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php +++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php @@ -19,7 +19,7 @@ /** * Class for identifying language via URL prefix or domain. * - * @Plugin( + * @LanguageNegotiation( * id = \Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUrl::METHOD_ID, * types = {\Drupal\Core\Language\LanguageInterface::TYPE_INTERFACE, * \Drupal\Core\Language\LanguageInterface::TYPE_CONTENT, diff --git a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrlFallback.php b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrlFallback.php index abaa6e39051e05fcca6017f793947c327bcc8017..f585622cf83b51c12bd1eb937f3df83bc69ad23a 100644 --- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrlFallback.php +++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrlFallback.php @@ -32,7 +32,7 @@ * fixed. This is done by introducing a prefix or domain in the rendered * page matching the detected interface language. * - * @Plugin( + * @LanguageNegotiation( * id = Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUrlFallback::METHOD_ID, * types = {Drupal\Core\Language\LanguageInterface::TYPE_URL}, * weight = 8, diff --git a/core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTest.php b/core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTest.php index e9f9a2723d194e590a80c3a609585a8112e2a54f..ea78138f1e3a6110835797d634499e244d0ad67d 100644 --- a/core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTest.php +++ b/core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTest.php @@ -13,7 +13,7 @@ /** * Class for identifying language from a selected language. * - * @Plugin( + * @LanguageNegotiation( * id = "test_language_negotiation_method", * weight = -10, * name = @Translation("Test"), diff --git a/core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTestTs.php b/core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTestTs.php index cef125c804b80b5955c3a606316d7291953304f2..b1f463c3e07b8e4198e09b630169749dcf616c9b 100644 --- a/core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTestTs.php +++ b/core/modules/language/tests/language_test/src/Plugin/LanguageNegotiation/LanguageNegotiationTestTs.php @@ -12,7 +12,7 @@ /** * Class for identifying language from a selected language. * - * @Plugin( + * @LanguageNegotiation( * id = "test_language_negotiation_method_ts", * weight = -10, * name = @Translation("Type-specific test"), diff --git a/core/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUser.php b/core/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUser.php index 623dac6dc3cfdb5ab9415bb83b60af6cc1d09fbe..e609c39a85483d21dcfa4a26146120aa631658ab 100644 --- a/core/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUser.php +++ b/core/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUser.php @@ -13,7 +13,7 @@ /** * Class for identifying language from the user preferences. * - * @Plugin( + * @LanguageNegotiation( * id = \Drupal\user\Plugin\LanguageNegotiation\LanguageNegotiationUser::METHOD_ID, * weight = -4, * name = @Translation("User"), diff --git a/core/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUserAdmin.php b/core/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUserAdmin.php index 2f27bf895c6627396531bb68131ef21424bae179..b95307234ac892738309be21936021e854652a71 100644 --- a/core/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUserAdmin.php +++ b/core/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUserAdmin.php @@ -23,7 +23,7 @@ /** * Identifies admin language from the user preferences. * - * @Plugin( + * @LanguageNegotiation( * id = Drupal\user\Plugin\LanguageNegotiation\LanguageNegotiationUserAdmin::METHOD_ID, * types = {Drupal\Core\Language\LanguageInterface::TYPE_INTERFACE}, * weight = -10,