CommentManager service (id
comment.manager) was added to allow a swappable back-end to comment module functionality. Its methods defined by the
CommentManagerInterface so other services should inject it by referencing to this one.
Currently it implements following helper methods
getFields($entity_type) - returns an array of comment fields of the
getAllFields() - returns all active comment fields
addDefaultField($entity_type, $bundle, $field_name = 'comment', $default_value = COMMENT_OPEN); - Attaches a comment field named 'comment' to the given entity type and bundle.
addBodyField($entity_type, $field_name) - Creates a
comment_body field instance for the comment bundle defined by
$entity_type and its $field_name the
_comment_body_field_create() is gone in favor of it.