diff --git a/application/config/module.config.php b/application/config/module.config.php index db1deac12..843837281 100644 --- a/application/config/module.config.php +++ b/application/config/module.config.php @@ -519,6 +519,7 @@ Form\Initializer\Csrf::class, ], 'factories' => [ + 'Omeka\Form\AssetEditForm' => Service\Form\FormWithEventManagerFactory::class, 'Omeka\Form\ResourceForm' => Service\Form\ResourceFormFactory::class, 'Omeka\Form\VocabularyForm' => Service\Form\VocabularyFormFactory::class, 'Omeka\Form\ResourceBatchUpdateForm' => Service\Form\ResourceBatchUpdateFormFactory::class, diff --git a/application/src/Service/Form/FormWithEventManagerFactory.php b/application/src/Service/Form/FormWithEventManagerFactory.php new file mode 100644 index 000000000..56c8cb7ac --- /dev/null +++ b/application/src/Service/Form/FormWithEventManagerFactory.php @@ -0,0 +1,16 @@ +setEventManager($services->get('EventManager')); + return $form; + } +}