class LanguageNegotiation
Same name in this branch
- 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
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
- 8.9.x core/modules/language/src/Annotation/LanguageNegotiation.php \Drupal\language\Annotation\LanguageNegotiation
- 8.9.x 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
Defines a language negotiation attribute object.
Plugin Namespace: Plugin\LanguageNegotiation
For a working example, see \Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationBrowser.
Hierarchy
- class \Drupal\Component\Plugin\Attribute\AttributeBase implements \Drupal\Component\Plugin\Attribute\AttributeInterface
- class \Drupal\Component\Plugin\Attribute\Plugin extends \Drupal\Component\Plugin\Attribute\AttributeBase
- class \Drupal\language\Attribute\LanguageNegotiation extends \Drupal\Component\Plugin\Attribute\Plugin
- class \Drupal\Component\Plugin\Attribute\Plugin extends \Drupal\Component\Plugin\Attribute\AttributeBase
Expanded class hierarchy of LanguageNegotiation
See also
\Drupal\language\LanguageNegotiator
\Drupal\language\LanguageNegotiationMethodManager
\Drupal\language\LanguageNegotiationMethodInterface
hook_language_negotiation_info_alter()
12 files declare their use of LanguageNegotiation
- LanguageNegotiationBrowser.php in core/
modules/ language/ src/ Plugin/ LanguageNegotiation/ LanguageNegotiationBrowser.php - LanguageNegotiationContentEntity.php in core/
modules/ language/ src/ Plugin/ LanguageNegotiation/ LanguageNegotiationContentEntity.php - LanguageNegotiationMethodManager.php in core/
modules/ language/ src/ LanguageNegotiationMethodManager.php - LanguageNegotiationSelected.php in core/
modules/ language/ src/ Plugin/ LanguageNegotiation/ LanguageNegotiationSelected.php - LanguageNegotiationSession.php in core/
modules/ language/ src/ Plugin/ LanguageNegotiation/ LanguageNegotiationSession.php
File
-
core/
modules/ language/ src/ Attribute/ LanguageNegotiation.php, line 22
Namespace
Drupal\language\AttributeView source
class LanguageNegotiation extends Plugin {
/**
* Constructs an LanguageNegotiation attribute.
*
* @param string $id
* The language negotiation plugin ID.
* @param \Drupal\Core\StringTranslation\TranslatableMarkup $name
* The human-readable name of the language negotiation plugin.
* @param string[]|null $types
* An array of language types, such as the
* \Drupal\Core\Language\LanguageInterface::TYPE_* constants.
* 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.
* @param int $weight
* The default weight of the language negotiation plugin.
* @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $description
* The description of the language negotiation plugin.
* @param string|null $config_route_name
* (optional) The route pointing to the plugin's configuration page.
*/
public function __construct(string $id, TranslatableMarkup $name, ?array $types = NULL, int $weight = 0, ?TranslatableMarkup $description = NULL, ?string $config_route_name = NULL) {
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
AttributeBase::$class | protected | property | The class used for this attribute class. | ||
AttributeBase::$provider | protected | property | The provider of the attribute class. | ||
AttributeBase::get | public | function | Overrides AttributeInterface::get | 6 | |
AttributeBase::getClass | public | function | Overrides AttributeInterface::getClass | 1 | |
AttributeBase::getId | public | function | Overrides AttributeInterface::getId | ||
AttributeBase::getProvider | public | function | Overrides AttributeInterface::getProvider | ||
AttributeBase::setClass | public | function | Overrides AttributeInterface::setClass | 1 | |
AttributeBase::setProvider | public | function | Overrides AttributeInterface::setProvider | ||
LanguageNegotiation::__construct | public | function | Constructs an LanguageNegotiation attribute. | Overrides Plugin::__construct |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.