- Issue created by @ashish.poddar
When a media asset is deleted in Bynder, the corresponding Drupal media entity remains in the system. Currently, the module only logs this situation during cron runs but doesn't provide any mechanism for modules to react to this deletion.
1. Set up Bynder integration
2. Create media entities using Bynder assets
3. Delete an asset in Bynder
4. Run cron
5. Observe that the media entity remains in Drupal with only a log message indicating the remote deletion
Add a new hook 'hook_bynder_media_deleted' that gets invoked when a Bynder asset is detected as deleted. This allows other modules to properly handle the cleanup of orphaned media entities.
1. Review and test the patch
2. Add tests if required
3. Update documentation to include the new hook
None
New hook introduced: hook_bynder_media_deleted($missing_remote_entity)
- Parameter: $missing_remote_entity (MediaInterface) - The media entity that references the deleted Bynder asset
- Purpose: Allows modules to react when a Bynder asset is deleted from the remote system
None
Active
4.3
Code