3 namespace Drupal\entity_module_test\Entity;
5 use Drupal\Core\Config\Entity\ConfigEntityBundleBase;
6 use Drupal\Core\Entity\EntityDescriptionInterface;
7 use Drupal\Core\Entity\RevisionableEntityBundleInterface;
10 * Provides bundles for the test entity.
13 * id = "entity_test_enhanced_bundle",
14 * label = @Translation("Entity test with enhancments - Bundle"),
15 * admin_permission = "administer entity_test_enhanced",
16 * config_prefix = "entity_test_enhanced_bundle",
17 * bundle_of = "entity_test_enhanced",
29 class EnhancedEntityBundle extends ConfigEntityBundleBase implements EntityDescriptionInterface, RevisionableEntityBundleInterface {
46 * The bundle description.
50 protected $description;
53 * Should new entities of this bundle have a new revision by default.
57 protected $new_revision = FALSE;
62 public function getDescription() {
63 return $this->description;
69 public function setDescription($description) {
70 $this->description = $description;
77 public function shouldCreateNewRevision() {
78 return $this->new_revision;