1. 8.2.x core/modules/language/src/Plugin/migrate/process/LanguageNegotiation.php
  2. 8.2.x core/modules/language/src/Annotation/LanguageNegotiation.php
  3. 8.0.x core/modules/language/src/Annotation/LanguageNegotiation.php
  4. 8.1.x core/modules/language/src/Annotation/LanguageNegotiation.php
  5. 8.3.x core/modules/language/src/Plugin/migrate/process/LanguageNegotiation.php
  6. 8.3.x core/modules/language/src/Annotation/LanguageNegotiation.php

Namespace

Drupal\language\Annotation

File

core/modules/language/src/Annotation/LanguageNegotiation.php
View source
  1. <?php
  2. namespace Drupal\language\Annotation;
  3. use Drupal\Component\Annotation\Plugin;
  4. /**
  5. * Defines a language negotiation annotation object.
  6. *
  7. * Plugin Namespace: Plugin\LanguageNegotiation
  8. *
  9. * For a working example, see
  10. * \Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationBrowser.
  11. *
  12. * @see \Drupal\language\LanguageNegotiator
  13. * @see \Drupal\language\LanguageNegotiationMethodManager
  14. * @see \Drupal\language\LanguageNegotiationMethodInterface
  15. * @see hook_language_negotiation_info_alter()
  16. * @see plugin_api
  17. *
  18. * @Annotation
  19. */
  20. class LanguageNegotiation extends Plugin {
  21. /**
  22. * The language negotiation plugin ID.
  23. *
  24. * @var string
  25. */
  26. public $id;
  27. /**
  28. * An array of allowed language types.
  29. *
  30. * If a language negotiation plugin does not specify which language types it
  31. * should be used with, it will be available for all the configurable
  32. * language types.
  33. *
  34. * @var string[]
  35. * An array of language types, such as the
  36. * \Drupal\Core\Language\LanguageInterface::TYPE_* constants.
  37. */
  38. public $types;
  39. /**
  40. * The default weight of the language negotiation plugin.
  41. *
  42. * @var int
  43. */
  44. public $weight;
  45. /**
  46. * The human-readable name of the language negotiation plugin.
  47. *
  48. * @ingroup plugin_translatable
  49. *
  50. * @var \Drupal\Core\Annotation\Translation
  51. */
  52. public $name;
  53. /**
  54. * The description of the language negotiation plugin.
  55. *
  56. * @ingroup plugin_translatable
  57. *
  58. * @var \Drupal\Core\Annotation\Translation
  59. */
  60. public $description;
  61. /**
  62. * The route pointing to the plugin's configuration page.
  63. *
  64. * @var string
  65. */
  66. public $config_route_name;
  67. }

Classes

Namesort descending Description
LanguageNegotiation Defines a language negotiation annotation object.