retrieve permalink if empty when sending webhook (#4251)

This commit is contained in:
Aina Sitraka
2023-02-22 11:26:29 +03:00
committed by GitHub
parent 8f8631ee31
commit be5c5a2e4a
2 changed files with 25 additions and 2 deletions

View File

@@ -34,8 +34,9 @@ class EventProcessorFactory
$this->registerFactory(WebhookEvent::ORDER_TYPE, new OrderNotificationProcessorFactory($app));
$this->registerFactory(WebhookEvent::USER_TYPE, new UserProcessorFactory());
$this->registerCallableFactory(WebhookEvent::RECORD_SUBDEF_TYPE, function () {
return new SubdefEventProcessor();
$this->registerCallableFactory(WebhookEvent::RECORD_SUBDEF_TYPE, function () use ($app) {
return (new SubdefEventProcessor())
->setApplicationBox($app['phraseanet.appbox']);
});
$this->registerCallableFactory(WebhookEvent::RECORD_TYPE, function () {
return new RecordEventProcessor();