3 namespace Drupal\block_content\Entity;
5 use Drupal\Core\Config\Entity\ConfigEntityBundleBase;
6 use Drupal\block_content\BlockContentTypeInterface;
9 * Defines the custom block type entity.
12 * id = "block_content_type",
13 * label = @Translation("Custom block type"),
16 * "default" = "Drupal\block_content\BlockContentTypeForm",
17 * "add" = "Drupal\block_content\BlockContentTypeForm",
18 * "edit" = "Drupal\block_content\BlockContentTypeForm",
19 * "delete" = "Drupal\block_content\Form\BlockContentTypeDeleteForm"
21 * "list_builder" = "Drupal\block_content\BlockContentTypeListBuilder"
23 * admin_permission = "administer blocks",
24 * config_prefix = "type",
25 * bundle_of = "block_content",
31 * "delete-form" = "/admin/structure/block/block-content/manage/{block_content_type}/delete",
32 * "edit-form" = "/admin/structure/block/block-content/manage/{block_content_type}",
33 * "collection" = "/admin/structure/block/block-content/types",
43 class BlockContentType extends ConfigEntityBundleBase implements BlockContentTypeInterface {
46 * The custom block type ID.
53 * The custom block type label.
60 * The default revision setting for custom blocks of this type.
67 * The description of the block type.
71 protected $description;
76 public function getDescription() {
77 return $this->description;
83 public function shouldCreateNewRevision() {
84 return $this->revision;