Commit c6b14291 authored by chr.fritsch's avatar chr.fritsch Committed by chr.fritsch
Browse files

Issue #3188665 by chr.fritsch, volkerk, daniel.bosen: Execute field mapping...

Issue #3188665 by chr.fritsch, volkerk, daniel.bosen: Execute field mapping before displaying in IEF form
parent 4354e093
......@@ -141,6 +141,9 @@ class InlineEntityFormMediaWidget extends MediaEntityDropzoneJsEbWidget {
$file = $media_entity->$source_field->entity;
$file->save();
$media_entity->$source_field->target_id = $file->id();
if (method_exists($media_entity, 'prepareSave')) {
$media_entity->prepareSave();
}
/** @var \Drupal\dropzonejs\Events\DropzoneMediaEntityCreateEvent $event */
$event = $this->eventDispatcher->dispatch(Events::MEDIA_ENTITY_PRECREATE, new DropzoneMediaEntityCreateEvent($media_entity, $file, $form, $form_state, $form));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment