Act before comment deletion.
This hook is invoked from comment_delete_multiple() before field_attach_delete() is called and before the comment is actually removed from the database.
Drupal\comment\Comment $comment: The comment object for the comment that is about to be deleted.
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
function hook_comment_predelete(Drupal\comment\Comment $comment) {
// Delete a record associated with the comment in a custom table.
db_delete('example_comment_table')
->condition('cid', $comment->cid)
->execute();
}