Act on a newly created comment.
This hook runs after a new comment object has just been instantiated. It can be used to set initial values, e.g. to provide defaults.
\Drupal\comment\Plugin\Core\Entity\Comment $comment: The comment object.
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_create(\Drupal\comment\Plugin\Core\Entity\Comment $comment) {
if (!isset($comment->foo)) {
$comment->foo = 'some_initial_value';
}
}