3 namespace Drupal\comment\Entity;
5 use Drupal\Core\Config\Entity\ConfigEntityBundleBase;
6 use Drupal\comment\CommentTypeInterface;
9 * Defines the comment type entity.
12 * id = "comment_type",
13 * label = @Translation("Comment type"),
14 * label_singular = @Translation("comment type"),
15 * label_plural = @Translation("comment types"),
16 * label_count = @PluralTranslation(
17 * singular = "@count comment type",
18 * plural = "@count comment types",
22 * "default" = "Drupal\comment\CommentTypeForm",
23 * "add" = "Drupal\comment\CommentTypeForm",
24 * "edit" = "Drupal\comment\CommentTypeForm",
25 * "delete" = "Drupal\comment\Form\CommentTypeDeleteForm"
27 * "list_builder" = "Drupal\comment\CommentTypeListBuilder"
29 * admin_permission = "administer comment types",
30 * config_prefix = "type",
31 * bundle_of = "comment",
37 * "delete-form" = "/admin/structure/comment/manage/{comment_type}/delete",
38 * "edit-form" = "/admin/structure/comment/manage/{comment_type}",
39 * "add-form" = "/admin/structure/comment/types/add",
40 * "collection" = "/admin/structure/comment",
45 * "target_entity_type_id",
50 class CommentType extends ConfigEntityBundleBase implements CommentTypeInterface {
53 * The comment type ID.
60 * The comment type label.
67 * The description of the comment type.
71 protected $description;
74 * The target entity type.
78 protected $target_entity_type_id;
83 public function getDescription() {
84 return $this->description;
90 public function setDescription($description) {
91 $this->description = $description;
98 public function getTargetEntityTypeId() {
99 return $this->target_entity_type_id;