/**
  * Determines whether the passed field has been already deleted.
  *
  * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition
  *   The field storage definition.
  *
  * @return bool
  *   Whether the field has been already deleted.
  */
 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));
 }