function PrimaryKey::__construct

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

Constructor.

Parameters

list<KeyColumn|string> $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/PrimaryKey.php, line 20

Class

PrimaryKey
Describes a table's primary key.

Namespace

Drupal\Core\Database\SchemaDefinition

Code

public function __construct(array $columns) {
  parent::__construct($columns, FALSE);
}

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