- Issue created by @bigtomfelix
- 🇩🇪Germany jurgenhaas Gottmadingen
When the event for pre-delete is being dispatched, Drupal is already in the process of doing it and only throwing an exception would be able to stop that process.
If you want to have a friendly control, you need to do that with access control, i.e. only providing the delete button if the conditions you mentioned are met.
- 🇮🇹Italy bigtomfelix
I figured the pre-delete function wouldn't work. I need to create a custom view for each user that can display their own submissions. In addition to the submission title, I also wanted to display the link to delete the submission. This link should only be visible under one condition, which I can implement with eca. But I don't understand how to combine the two.
- 🇩🇪Germany jurgenhaas Gottmadingen
The link to delete each row could be created with a "Views field" action. ECA would provide that as an event which receives the entity for each row where it can determine if deletion is allowed or not. If it is, it returns the link to delete that entity, otherwise it returns nothing.
In the view you can add an extra column with the ECA Views Field. That's it.