How to get comment cid in hook_comment_insert? I've read the answers to How to get the node id the comment is attached to in hook_comment_insert? and found how to extract the nid of the node the comment is associated with.
However, I also need to get the cid of the comment itself from inside hook_comment_insert(). How do I do that?
All entities have an id() method:
$cid = $entity-&gt;id();