Same name and namespace in other branches
  1. 8.9.x core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoUuid.php \Drupal\entity_test\Entity\EntityTestNoUuid
  2. 9 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoUuid.php \Drupal\entity_test\Entity\EntityTestNoUuid

Test entity class with revisions but without UUIDs.

Plugin annotation


@ContentEntityType(
  id = "entity_test_no_uuid",
  label = @Translation("Test entity without UUID"),
  handlers = {
    "access" = "Drupal\entity_test\EntityTestAccessControlHandler",
  },
  base_table = "entity_test_no_uuid",
  revision_table = "entity_test_no_uuid_revision",
  admin_permission = "administer entity_test content",
  persistent_cache = FALSE,
  entity_keys = {
    "id" = "id",
    "revision" = "vid",
    "bundle" = "type",
    "label" = "name",
    "langcode" = "langcode",
  },
)

Hierarchy

Expanded class hierarchy of EntityTestNoUuid

1 file declares its use of EntityTestNoUuid
EntityAccessControlHandlerTest.php in core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php

File

core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoUuid.php, line 27

Namespace

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

}

Members

Namesort descending Modifiers Type Description Overrides
EntityTest::baseFieldDefinitions public static function 16
EntityTest::getEntityKey public function
EntityTest::getName public function Returns the name.
EntityTest::getOwner public function Returns the entity owner's user entity. Overrides EntityOwnerInterface::getOwner
EntityTest::getOwnerId public function Returns the entity owner's user ID. Overrides EntityOwnerInterface::getOwnerId
EntityTest::preCreate public static function 1
EntityTest::setName public function Sets the name.
EntityTest::setOwner public function Sets the entity owner's user entity. Overrides EntityOwnerInterface::setOwner
EntityTest::setOwnerId public function Sets the entity owner's user ID. Overrides EntityOwnerInterface::setOwnerId