public function SqlContentEntityStorage::setFieldStorageDefinitions in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::setFieldStorageDefinitions()
- 10 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::setFieldStorageDefinitions()
Updates the internal list of field storage definitions.
@internal Only to be used internally by Entity API.
Parameters
\Drupal\Core\Field\FieldStorageDefinitionInterface[] $field_storage_definitions: An array of field storage definitions.
File
- core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorage.php, line 324
Class
- SqlContentEntityStorage
- A content entity database storage implementation.
Namespace
Drupal\Core\Entity\SqlCode
public function setFieldStorageDefinitions(array $field_storage_definitions) {
foreach ($field_storage_definitions as $field_storage_definition) {
if ($field_storage_definition
->getTargetEntityTypeId() !== $this->entityType
->id()) {
throw new EntityStorageException("Unsupported entity type {$field_storage_definition->getTargetEntityTypeId()}");
}
}
$this->fieldStorageDefinitions = $field_storage_definitions;
}