/**
  * {@inheritdoc}
  */
 protected function doDelete($entities)
 {
     // ZZ is the fallback address format and it must always be present.
     if (array_key_exists('ZZ', $entities) && current($entities)->isUninstalling() === FALSE) {
         throw new EntityStorageException("The 'ZZ' address format can't be deleted.");
     }
     parent::doDelete($entities);
 }
 /**
  * {@inheritdoc}
  */
 protected function doDelete($entities)
 {
     // ZZ is the fallback address format and it must always be present.
     if (isset($entities['ZZ'])) {
         $entity = $entities['ZZ'];
         if (!$entity->isUninstalling() && !$entity->isSyncing()) {
             throw new EntityStorageException("The 'ZZ' address format can't be deleted.");
         }
     }
     parent::doDelete($entities);
 }