class EntityTestNoBundle

Same name in other branches
  1. 9 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoBundle.php \Drupal\entity_test\Entity\EntityTestNoBundle
  2. 10 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoBundle.php \Drupal\entity_test\Entity\EntityTestNoBundle
  3. 11.x core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoBundle.php \Drupal\entity_test\Entity\EntityTestNoBundle

Test entity class with no bundle.

Plugin annotation


@ContentEntityType(
  id = "entity_test_no_bundle",
  label = @Translation("Entity Test without bundle"),
  base_table = "entity_test_no_bundle",
  handlers = {
    "views_data" = "Drupal\views\EntityViewsData"
  },
  entity_keys = {
    "id" = "id",
    "revision" = "revision_id",
  },
  admin_permission = "administer entity_test content",
  links = {
    "add-form" = "/entity_test_no_bundle/add",
  },
)

Hierarchy

Expanded class hierarchy of EntityTestNoBundle

1 file declares its use of EntityTestNoBundle
ViewsModerationStateFilterTest.php in core/modules/content_moderation/tests/src/Kernel/ViewsModerationStateFilterTest.php

File

core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoBundle.php, line 25

Namespace

Drupal\entity_test\Entity
View source
class EntityTestNoBundle extends EntityTest {

}

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