CollaboratorGroupDeleted
Fires when a collaborator group is deleted via the REST API. Broadcast before the underlying row is removed.
Last updated: June 3, 2026
CollaboratorGroupDeleted fires when an operator deletes a collaborator group through the REST API. The event is broadcast before the actual datastore delete runs. This lets listeners hydrate any context they need (the group’s name, its current members) while the row is still readable.
The event ID is collaborator_group_deleted, and its fully qualified class is Siren\Plus\Core\Groups\Events\CollaboratorGroupDeleted. It is fired by the delete-group REST endpoint, so a group removed by another path does not fire it. The controller broadcasts it and then calls the datastore delete, so the event marks a delete that is about to run, not one that is already committed. To run code when it fires, register a handler with Siren’s event system. See listeners for how to register one and the events introduction for the dispatch model.
What does this event carry?
The event carries one value: the id of the group being deleted. Because the broadcast is pre-delete, listeners can still call into the datastore to load the full record during the handler.
use PHPNomad\Events\Interfaces\CanHandle;
use PHPNomad\Events\Interfaces\Event;
use Siren\Plus\Core\Groups\Events\CollaboratorGroupDeleted;
class SnapshotGroupBeforeDelete implements CanHandle
{
public function handle(Event $event): void
{
if (!$event instanceof CollaboratorGroupDeleted) {
return;
}
$groupId = $event->getGroupId();
// The group row is still in the datastore at this point,
// safe to read its name, structure, members for an audit log
}
}
Related events
CollaboratorGroupCreated and CollaboratorGroupRenamed cover the start of the group lifecycle, and CollaboratorGroupStructureChanged covers structure edits. The collaborator group events reference lists the full family.
How does it fit?
The note system uses the pre-delete window to capture the group name on the activity entry it writes. Once the row is gone, the standard source-data resolver would return null, so the handler is your one chance to read anything off the group. Capture whatever you need (the name, the members, the bindings) inside the handler, because it is unrecoverable once the handler returns.
The delete is not announced piece by piece. When the group is removed, its membership rows are deleted in bulk, and no per-member CollaboratorRemovedFromCollaboratorGroup events fire for them. Programs and distributors bound to the group are not detached either. Their binding stays on record pointing at the now-deleted group, and a cascade or eligibility check bound to it fails closed and credits no one until you re-bind or remove it. So if you mirror Siren state externally, do not wait for member or binding events on a group delete. Snapshot the members and bindings in this handler and tear them down on your side.