You are here

function pdf_to_image_entity_update in PDF to ImageField 7.3

When a fieldable entity is being updated, regenerate the files.

This is the first step where generation really starts happening.

Parameters

stdclass $entity: Entity being processed.

string $entity_type: Entity type is always needed.

1 call to pdf_to_image_entity_update()
pdf_to_image_entity_insert in ./pdf_to_image.module
Update any of our fields when a fieldable entity is being updated.

File

./pdf_to_image.module, line 374
Generates thumbnail image(s) from an uploaded PDF.

Code

function pdf_to_image_entity_update($entity, $entity_type) {

  // What is this thing?
  $info = entity_get_info($entity_type);
  list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
  $pdf_fields = pdf_to_image_source_fields($entity_type, $bundle);
  foreach ($pdf_fields as $field_id => $field_instance) {
    pdf_to_image_generate_process($entity_type, $entity, $field_id, $field_instance);
  }
}