function KeyBase::__construct
Constructor.
Parameters
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.
bool $limitedLengthAllowed: Defines if limited length columns are allowed.
4 calls to KeyBase::__construct()
- ForeignKey::__construct in core/
lib/ Drupal/ Core/ Database/ SchemaDefinition/ ForeignKey.php - Constructor.
- Index::__construct in core/
lib/ Drupal/ Core/ Database/ SchemaDefinition/ Index.php - Constructor.
- PrimaryKey::__construct in core/
lib/ Drupal/ Core/ Database/ SchemaDefinition/ PrimaryKey.php - Constructor.
- UniqueKey::__construct in core/
lib/ Drupal/ Core/ Database/ SchemaDefinition/ UniqueKey.php - Constructor.
4 methods override KeyBase::__construct()
- ForeignKey::__construct in core/
lib/ Drupal/ Core/ Database/ SchemaDefinition/ ForeignKey.php - Constructor.
- Index::__construct in core/
lib/ Drupal/ Core/ Database/ SchemaDefinition/ Index.php - Constructor.
- PrimaryKey::__construct in core/
lib/ Drupal/ Core/ Database/ SchemaDefinition/ PrimaryKey.php - Constructor.
- UniqueKey::__construct in core/
lib/ Drupal/ Core/ Database/ SchemaDefinition/ UniqueKey.php - Constructor.
File
-
core/
lib/ Drupal/ Core/ Database/ SchemaDefinition/ KeyBase.php, line 32
Class
- KeyBase
- Base class for table keys (primary, unique, index).
Namespace
Drupal\Core\Database\SchemaDefinitionCode
public function __construct(array $columns, bool $limitedLengthAllowed) {
$this->columns = $this->buildKeyColumns($columns, $limitedLengthAllowed);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.