function social_event_user_delete in Open Social 8.9
Same name and namespace in other branches
- 8 modules/social_features/social_event/social_event.module \social_event_user_delete()
- 8.2 modules/social_features/social_event/social_event.module \social_event_user_delete()
- 8.3 modules/social_features/social_event/social_event.module \social_event_user_delete()
- 8.4 modules/social_features/social_event/social_event.module \social_event_user_delete()
- 8.5 modules/social_features/social_event/social_event.module \social_event_user_delete()
- 8.6 modules/social_features/social_event/social_event.module \social_event_user_delete()
- 8.7 modules/social_features/social_event/social_event.module \social_event_user_delete()
- 8.8 modules/social_features/social_event/social_event.module \social_event_user_delete()
- 10.3.x modules/social_features/social_event/social_event.module \social_event_user_delete()
- 10.0.x modules/social_features/social_event/social_event.module \social_event_user_delete()
- 10.1.x modules/social_features/social_event/social_event.module \social_event_user_delete()
- 10.2.x modules/social_features/social_event/social_event.module \social_event_user_delete()
Implements hook_ENTITY_TYPE_delete().
File
- modules/
social_features/ social_event/ social_event.module, line 426 - The Social event module.
Code
function social_event_user_delete(EntityInterface $entity) {
$storage = \Drupal::entityTypeManager()
->getStorage('event_enrollment');
$entities = $storage
->loadByProperties([
'user_id' => $entity
->id(),
]);
$storage
->delete($entities);
}