function EntityTestUpdateStorageSchema::getEntitySchema

Same name in other branches
  1. 8.9.x core/modules/system/tests/modules/entity_test_update/src/EntityTestUpdateStorageSchema.php \Drupal\entity_test_update\EntityTestUpdateStorageSchema::getEntitySchema()
  2. 10 core/modules/system/tests/modules/entity_test_update/src/EntityTestUpdateStorageSchema.php \Drupal\entity_test_update\EntityTestUpdateStorageSchema::getEntitySchema()
  3. 11.x core/modules/system/tests/modules/entity_test_update/src/EntityTestUpdateStorageSchema.php \Drupal\entity_test_update\EntityTestUpdateStorageSchema::getEntitySchema()

Overrides SqlContentEntityStorageSchema::getEntitySchema

File

core/modules/system/tests/modules/entity_test_update/src/EntityTestUpdateStorageSchema.php, line 17

Class

EntityTestUpdateStorageSchema
Defines the entity_test_update storage_schema handler.

Namespace

Drupal\entity_test_update

Code

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;
}

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