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