Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LanguageNegotiation.php

function 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\Attribute

Code

public function __construct(string $id, TranslatableMarkup $name, ?array $types = NULL, int $weight = 0, ?TranslatableMarkup $description = NULL, ?string $config_route_name = NULL) {
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal