class EntityTestNoBundleWithLabel

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

Test entity class with no bundle but with label.

Plugin annotation


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

Hierarchy

Expanded class hierarchy of EntityTestNoBundleWithLabel

File

core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoBundleWithLabel.php, line 26

Namespace

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

}

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