function LanguageNegotiation::__construct
Same name in other branches
- 11.x core/modules/language/src/Attribute/LanguageNegotiation.php \Drupal\language\Attribute\LanguageNegotiation::__construct()
Constructs an LanguageNegotiation attribute.
Parameters
string $id: The language negotiation plugin ID.
\Drupal\Core\StringTranslation\TranslatableMarkup $name: The human-readable name of the language negotiation plugin.
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.
int $weight: The default weight of the language negotiation plugin.
\Drupal\Core\StringTranslation\TranslatableMarkup|null $description: The description of the language negotiation plugin.
string|null $config_route_name: (optional) The route pointing to the plugin's configuration page.
Overrides Plugin::__construct
File
-
core/
modules/ language/ src/ Attribute/ LanguageNegotiation.php, line 45
Class
- LanguageNegotiation
- Defines a language negotiation attribute object.
Namespace
Drupal\language\AttributeCode
public function __construct(string $id, TranslatableMarkup $name, ?array $types = NULL, int $weight = 0, ?TranslatableMarkup $description = NULL, ?string $config_route_name = NULL) {
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.