class EntityTestNoLabel

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoLabel.php \Drupal\entity_test\Entity\EntityTestNoLabel

Test entity class.

Plugin annotation


@ContentEntityType(
  id = "entity_test_no_label",
  label = @Translation("Entity Test without label"),
  internal = TRUE,
  persistent_cache = FALSE,
  base_table = "entity_test_no_label",
  handlers = {
    "access" = "Drupal\entity_test\EntityTestAccessControlHandler",
  },
  entity_keys = {
    "id" = "id",
    "uuid" = "uuid",
    "bundle" = "type",
  },
)

Hierarchy

Expanded class hierarchy of EntityTestNoLabel

2 files declare their use of EntityTestNoLabel
EntityTestAmbiguousBundleClass.php in core/modules/system/tests/modules/entity_test_bundle_class/src/Entity/EntityTestAmbiguousBundleClass.php
InternalEntitiesTest.php in core/modules/jsonapi/tests/src/Functional/InternalEntitiesTest.php

File

core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoLabel.php, line 24

Namespace

Drupal\entity_test\Entity
View source
class EntityTestNoLabel extends EntityTest {
  
  /**
   * {@inheritdoc}
   */
  public function label() {
    return $this->getName();
  }

}

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