class LanguageNegotiation
Same name in this branch
- 8.9.x core/modules/language/src/Plugin/migrate/process/LanguageNegotiation.php \Drupal\language\Plugin\migrate\process\LanguageNegotiation
Same name in other branches
- 9 core/modules/language/src/Annotation/LanguageNegotiation.php \Drupal\language\Annotation\LanguageNegotiation
- 9 core/modules/language/src/Plugin/migrate/process/LanguageNegotiation.php \Drupal\language\Plugin\migrate\process\LanguageNegotiation
- 10 core/modules/language/src/Attribute/LanguageNegotiation.php \Drupal\language\Attribute\LanguageNegotiation
- 10 core/modules/language/src/Annotation/LanguageNegotiation.php \Drupal\language\Annotation\LanguageNegotiation
- 10 core/modules/language/src/Plugin/migrate/process/LanguageNegotiation.php \Drupal\language\Plugin\migrate\process\LanguageNegotiation
- 11.x core/modules/language/src/Attribute/LanguageNegotiation.php \Drupal\language\Attribute\LanguageNegotiation
- 11.x core/modules/language/src/Annotation/LanguageNegotiation.php \Drupal\language\Annotation\LanguageNegotiation
- 11.x core/modules/language/src/Plugin/migrate/process/LanguageNegotiation.php \Drupal\language\Plugin\migrate\process\LanguageNegotiation
Defines a language negotiation annotation object.
Plugin Namespace: Plugin\LanguageNegotiation
For a working example, see \Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationBrowser.
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements \Drupal\Component\Annotation\AnnotationInterface
- class \Drupal\language\Annotation\LanguageNegotiation extends \Drupal\Component\Annotation\Plugin
Expanded class hierarchy of LanguageNegotiation
See also
\Drupal\language\LanguageNegotiator
\Drupal\language\LanguageNegotiationMethodManager
\Drupal\language\LanguageNegotiationMethodInterface
hook_language_negotiation_info_alter()
Related topics
11 classes are annotated with LanguageNegotiation
- LanguageNegotiationBrowser in core/
modules/ language/ src/ Plugin/ LanguageNegotiation/ LanguageNegotiationBrowser.php - Class for identifying language from the browser Accept-language HTTP header.
- LanguageNegotiationContentEntity in core/
modules/ language/ src/ Plugin/ LanguageNegotiation/ LanguageNegotiationContentEntity.php - Class for identifying the content translation language.
- LanguageNegotiationSelected in core/
modules/ language/ src/ Plugin/ LanguageNegotiation/ LanguageNegotiationSelected.php - Class for identifying language from a selected language.
- LanguageNegotiationSession in core/
modules/ language/ src/ Plugin/ LanguageNegotiation/ LanguageNegotiationSession.php - Identify language from a request/session parameter.
- LanguageNegotiationTest in core/
modules/ language/ tests/ language_test/ src/ Plugin/ LanguageNegotiation/ LanguageNegotiationTest.php - Class for identifying language from a selected language.
File
-
core/
modules/ language/ src/ Annotation/ LanguageNegotiation.php, line 23
Namespace
Drupal\language\AnnotationView source
class LanguageNegotiation extends Plugin {
/**
* The language negotiation plugin ID.
*
* @var string
*/
public $id;
/**
* An array of allowed language types.
*
* If a language negotiation plugin does not specify which language types it
* should be used with, it will be available for all the configurable
* language types.
*
* @var string[]
* An array of language types, such as the
* \Drupal\Core\Language\LanguageInterface::TYPE_* constants.
*/
public $types;
/**
* The default weight of the language negotiation plugin.
*
* @var int
*/
public $weight;
/**
* The human-readable name of the language negotiation plugin.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*/
public $name;
/**
* The description of the language negotiation plugin.
*
* @ingroup plugin_translatable
*
* @var \Drupal\Core\Annotation\Translation
*/
public $description;
/**
* The route pointing to the plugin's configuration page.
*
* @var string
*/
public $config_route_name;
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
LanguageNegotiation::$config_route_name | public | property | The route pointing to the plugin's configuration page. | ||
LanguageNegotiation::$description | public | property | The description of the language negotiation plugin. | ||
LanguageNegotiation::$id | public | property | The language negotiation plugin ID. | ||
LanguageNegotiation::$name | public | property | The human-readable name of the language negotiation plugin. | ||
LanguageNegotiation::$types | public | property | An array of allowed language types. | ||
LanguageNegotiation::$weight | public | property | The default weight of the language negotiation plugin. | ||
Plugin::$definition | protected | property | The plugin definition read from the class annotation. | 1 | |
Plugin::get | public | function | Gets the value of an annotation. | Overrides AnnotationInterface::get | 5 |
Plugin::getClass | public | function | Gets the class of the annotated class. | Overrides AnnotationInterface::getClass | |
Plugin::getId | public | function | Gets the unique ID for this annotated class. | Overrides AnnotationInterface::getId | |
Plugin::getProvider | public | function | Gets the name of the provider of the annotated class. | Overrides AnnotationInterface::getProvider | 1 |
Plugin::parse | protected | function | Parses an annotation into its definition. | ||
Plugin::setClass | public | function | Sets the class of the annotated class. | Overrides AnnotationInterface::setClass | |
Plugin::setProvider | public | function | Sets the name of the provider of the annotated class. | Overrides AnnotationInterface::setProvider | |
Plugin::__construct | public | function | Constructs a Plugin object. | 2 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.