function Index::__construct

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Database/SchemaDefinition/Index.php \Drupal\Core\Database\SchemaDefinition\Index::__construct()

Constructor.

Parameters

string $name: The index name.

list<KeyColumn|string|array{0:string, 1:int}> $columns: A mix of key column specifiers, being KeyColumn objects, strings naming columns, or arrays of two elements, column name and length, specifying a prefix of the named column.

Overrides KeyBase::__construct

File

core/lib/Drupal/Core/Database/SchemaDefinition/Index.php, line 22

Class

Index
Describes a database index.

Namespace

Drupal\Core\Database\SchemaDefinition

Code

public function __construct(public readonly string $name, array $columns) {
  parent::__construct($columns, TRUE);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.