mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 22:13:13 +00:00
fix issuee whe trying to rebuild subdef from tool
This commit is contained in:
@@ -54,18 +54,20 @@ class RecordSubscriber implements EventSubscriberInterface
|
|||||||
if (!$record->isStory()) {
|
if (!$record->isStory()) {
|
||||||
$subdefs = $record->getDatabox()->get_subdef_structure()->getSubdefGroup($record->getType());
|
$subdefs = $record->getDatabox()->get_subdef_structure()->getSubdefGroup($record->getType());
|
||||||
|
|
||||||
foreach ($subdefs as $subdef) {
|
if ($subdefs !==null) {
|
||||||
$payload = [
|
foreach ($subdefs as $subdef) {
|
||||||
'message_type' => MessagePublisher::SUBDEF_CREATION_TYPE,
|
$payload = [
|
||||||
'payload' => [
|
'message_type' => MessagePublisher::SUBDEF_CREATION_TYPE,
|
||||||
'recordId' => $event->getRecord()->getRecordId(),
|
'payload' => [
|
||||||
'databoxId' => $event->getRecord()->getDataboxId(),
|
'recordId' => $event->getRecord()->getRecordId(),
|
||||||
'subdefName' => $subdef->get_name(),
|
'databoxId' => $event->getRecord()->getDataboxId(),
|
||||||
'status' => $event->isNewRecord() ? MessagePublisher::NEW_RECORD_MESSAGE : ''
|
'subdefName' => $subdef->get_name(),
|
||||||
]
|
'status' => $event->isNewRecord() ? MessagePublisher::NEW_RECORD_MESSAGE : ''
|
||||||
];
|
]
|
||||||
|
];
|
||||||
|
|
||||||
$this->messagePublisher->publishMessage($payload, MessagePublisher::SUBDEF_QUEUE);
|
$this->messagePublisher->publishMessage($payload, MessagePublisher::SUBDEF_QUEUE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user