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