CommentType.php

Same filename in this branch
  1. 11.x core/modules/comment/src/Plugin/migrate/source/CommentType.php
Same filename in other branches
  1. 9 core/modules/comment/src/Entity/CommentType.php
  2. 9 core/modules/comment/src/Plugin/migrate/source/CommentType.php
  3. 8.9.x core/modules/comment/src/Entity/CommentType.php
  4. 8.9.x core/modules/comment/src/Plugin/migrate/source/d7/CommentType.php
  5. 10 core/modules/comment/src/Entity/CommentType.php
  6. 10 core/modules/comment/src/Plugin/migrate/source/CommentType.php

Namespace

Drupal\comment\Entity

File

core/modules/comment/src/Entity/CommentType.php

View source
<?php

namespace Drupal\comment\Entity;

use Drupal\comment\CommentTypeForm;
use Drupal\comment\CommentTypeListBuilder;
use Drupal\comment\Form\CommentTypeDeleteForm;
use Drupal\Core\Entity\Attribute\ConfigEntityType;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\Core\Config\Entity\ConfigEntityBundleBase;
use Drupal\comment\CommentTypeInterface;
use Drupal\user\Entity\EntityPermissionsRouteProvider;

/**
 * Defines the comment type entity.
 */
class CommentType extends ConfigEntityBundleBase implements CommentTypeInterface {
    
    /**
     * The comment type ID.
     *
     * @var string
     */
    protected $id;
    
    /**
     * The comment type label.
     *
     * @var string
     */
    protected $label;
    
    /**
     * The description of the comment type.
     *
     * @var string
     */
    protected $description;
    
    /**
     * The target entity type.
     *
     * @var string
     */
    protected $target_entity_type_id;
    
    /**
     * {@inheritdoc}
     */
    public function getDescription() {
        return $this->description;
    }
    
    /**
     * {@inheritdoc}
     */
    public function setDescription($description) {
        $this->description = $description;
        return $this;
    }
    
    /**
     * {@inheritdoc}
     */
    public function getTargetEntityTypeId() {
        return $this->target_entity_type_id;
    }

}

Classes

Title Deprecated Summary
CommentType Defines the comment type entity.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.