class EntityTestUpdateStorageSchema
Same name and namespace in other branches
- 11.x core/modules/system/tests/modules/entity_test_update/src/EntityTestUpdateStorageSchema.php \Drupal\entity_test_update\EntityTestUpdateStorageSchema
- 10 core/modules/system/tests/modules/entity_test_update/src/EntityTestUpdateStorageSchema.php \Drupal\entity_test_update\EntityTestUpdateStorageSchema
- 8.9.x core/modules/system/tests/modules/entity_test_update/src/EntityTestUpdateStorageSchema.php \Drupal\entity_test_update\EntityTestUpdateStorageSchema
Defines the entity_test_update storage_schema handler.
Hierarchy
- class \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema implements \Drupal\Core\Entity\Schema\DynamicallyFieldableEntityStorageSchemaInterface uses \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Entity\Sql\SqlFieldableEntityTypeListenerTrait
- class \Drupal\entity_test_update\EntityTestUpdateStorageSchema extends \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema
Expanded class hierarchy of EntityTestUpdateStorageSchema
File
-
core/
modules/ system/ tests/ modules/ entity_test_update/ src/ EntityTestUpdateStorageSchema.php, line 12
Namespace
Drupal\entity_test_updateView source
class EntityTestUpdateStorageSchema extends SqlContentEntityStorageSchema {
/**
* {@inheritdoc}
*/
protected function getEntitySchema(ContentEntityTypeInterface $entity_type, $reset = FALSE) {
$schema = parent::getEntitySchema($entity_type, $reset);
if ($entity_type->id() == 'entity_test_update') {
$schema[$this->storage
->getBaseTable()]['indexes'] += \Drupal::state()->get('entity_test_update.additional_entity_indexes', []);
}
return $schema;
}
/**
* {@inheritdoc}
*/
protected function getSharedTableFieldSchema(FieldStorageDefinitionInterface $storage_definition, $table_name, array $column_mapping) {
$schema = parent::getSharedTableFieldSchema($storage_definition, $table_name, $column_mapping);
if (\Drupal::state()->get('entity_test_update.additional_field_index.' . $table_name . '.' . $storage_definition->getName())) {
$this->addSharedTableFieldIndex($storage_definition, $schema);
}
return $schema;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.