function FieldStorageConfig::getSchema
Same name in other branches
- 9 core/modules/field/src/Entity/FieldStorageConfig.php \Drupal\field\Entity\FieldStorageConfig::getSchema()
- 8.9.x core/modules/field/src/Entity/FieldStorageConfig.php \Drupal\field\Entity\FieldStorageConfig::getSchema()
- 11.x core/modules/field/src/Entity/FieldStorageConfig.php \Drupal\field\Entity\FieldStorageConfig::getSchema()
Overrides FieldStorageDefinitionInterface::getSchema
1 call to FieldStorageConfig::getSchema()
- FieldStorageConfig::getColumns in core/
modules/ field/ src/ Entity/ FieldStorageConfig.php - Returns the field columns, as defined in the field schema.
File
-
core/
modules/ field/ src/ Entity/ FieldStorageConfig.php, line 476
Class
- FieldStorageConfig
- Defines the Field storage configuration entity.
Namespace
Drupal\field\EntityCode
public function getSchema() {
if (!isset($this->schema)) {
// Get the schema from the field item class.
$class = $this->getFieldItemClass();
$schema = $class::schema($this);
// Fill in default values for optional entries.
$schema += [
'columns' => [],
'unique keys' => [],
'indexes' => [],
'foreign keys' => [],
];
// Merge custom indexes with those specified by the field type. Custom
// indexes prevail.
$schema['indexes'] = $this->indexes + $schema['indexes'];
$this->schema = $schema;
}
return $this->schema;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.