diff --git a/core/modules/language/src/Annotation/LanguageNegotiation.php b/core/modules/language/src/Annotation/LanguageNegotiation.php new file mode 100644 index 0000000..667c809 --- /dev/null +++ b/core/modules/language/src/Annotation/LanguageNegotiation.php @@ -0,0 +1,86 @@ +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 af36c75..013ef81 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 c4cd150..142ce0e 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 a1547c0..fcc0112 100644 --- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSession.php +++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSession.php @@ -17,7 +17,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 fd7eb75..6421aba 100644 --- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUI.php +++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUI.php @@ -13,7 +13,7 @@ /** * Class for identifying the language from the current interface language. * - * @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 b76b1b1..7c5c217 100644 --- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php +++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php @@ -18,7 +18,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 abaa6e3..f585622 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 e9f9a27..ea78138 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 cef125c..b1f463c 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 623dac6..e609c39 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 17b3cd6..dc8a119 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,