Skip to content
Snippets Groups Projects
Commit 0eaad340 authored by git's avatar git Committed by Owen Bush
Browse files

Issue #3282741 by endless_wander, owenbush: Deleting event instance deletes...

Issue #3282741 by endless_wander, owenbush: Deleting event instance deletes itself before all registrants are deleted
parent 7a208c55
No related branches found
No related tags found
No related merge requests found
......@@ -144,6 +144,10 @@ class EventInstanceDeleteForm extends ContentEntityDeleteForm {
else {
$series_instances = $entity->getEventSeries()->event_instances->referencedEntities();
// Allow other modules to react prior to deleting a specific instance
// after a date configuration change.
\Drupal::moduleHandler()->invokeAll('recurring_events_pre_delete_instance', [$entity]);
// Loop through all instances on the series and remove the reference to
// this instance.
if (!empty($series_instances)) {
......@@ -154,10 +158,6 @@ class EventInstanceDeleteForm extends ContentEntityDeleteForm {
}
}
// Allow other modules to react prior to deleting a specific instance
// after a date configuration change.
\Drupal::moduleHandler()->invokeAll('recurring_events_pre_delete_instance', [$entity]);
$entity->delete();
// Allow other modules to react after deleting a specific instance after a
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment