SqlContentEntityStorage::storageDefinitionIsDeleted

protected SqlContentEntityStorage::storageDefinitionIsDeleted(FieldStorageDefinitionInterface $storage_definition)

Determines whether the passed field has been already deleted.

Parameters

\Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition: The field storage definition.

Return value

bool Whether the field has been already deleted.

File

core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php, line 1689

Class

SqlContentEntityStorage
A content entity database storage implementation.

Namespace

Drupal\Core\Entity\Sql

Code

protected function storageDefinitionIsDeleted(FieldStorageDefinitionInterface $storage_definition) {
  // Configurable fields are marked for deletion.
  if ($storage_definition instanceOf FieldStorageConfigInterface) {
    return $storage_definition->isDeleted();
  }
  // For non configurable fields check whether they are still in the last
  // installed schema repository.
  return !array_key_exists($storage_definition->getName(), $this->entityManager->getLastInstalledFieldStorageDefinitions($this->entityTypeId));
}
doc_Drupal
2016-10-29 09:43:30
Comments
Leave a Comment

Please login to continue.