]) );
} } public function beforeDelete(EntityDeleteEvent
$event): void
{ /** @var list<string> $affected */
$affected =
array_values($event->
getIds(MediaThumbnailDefinition::ENTITY_NAME
));
if (!
empty($affected)) { $this->
handleThumbnailDeletion($event,
$affected,
$event->
getContext());
} /** @var list<string> $affected */
$affected =
array_values($event->
getIds(MediaFolderDefinition::ENTITY_NAME
));
if (!
empty($affected)) { $this->
handleFolderDeletion($affected,
$event->
getContext());
} /** @var list<string> $affected */
$affected =
array_values($event->
getIds(MediaDefinition::ENTITY_NAME
));
if (!
empty($affected)) {