function image_field_caption_entity_revision_delete in Image Field Caption 8
Implements hook_entity_revision_delete().
File
- ./
image_field_caption.module, line 289 - Provides a caption textarea for image fields.
Code
function image_field_caption_entity_revision_delete(EntityInterface $entity) {
// $imageCaption = Drupal::service('image_field_caption.storage');
/*
// For a fieldable entity.
if (($entity instanceof FieldableEntityInterface)) {
// Get the field names of all image fields.
$field_names = _image_field_caption_get_image_field_names($entity);
if (!empty($field_names)) {
// Delete the caption revisions associated to this specific revision.
$imageCaption->deleteCaptionRevisionsByRevisionId($entity->getRevisionId());
}
}
*/
}