function Schema::toArray
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Database/SchemaDefinition/Schema.php \Drupal\Core\Database\SchemaDefinition\Schema::toArray()
Converts the object to legacy array-based specifications.
@internal
Return value
array The legacy array-based specification.
Overrides SchemaDefinitionInterface::toArray
File
-
core/
lib/ Drupal/ Core/ Database/ SchemaDefinition/ Schema.php, line 87
Class
- Schema
- Describes a database schema as a collection of database objects.
Namespace
Drupal\Core\Database\SchemaDefinitionCode
public function toArray() : array {
$spec = [];
foreach ($this->tables as $table) {
$spec[$table->name] = $table->toArray();
}
return $spec;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.