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

Defines a test entity type with administrative routes.

Plugin annotation


@ContentEntityType(
  id = "entity_test_admin_routes",
  label = @Translation("Test entity - admin routes"),
  handlers = {
    "view_builder" = "Drupal\entity_test\EntityTestViewBuilder",
    "access" = "Drupal\entity_test\EntityTestAccessControlHandler",
    "form" = {
      "default" = "Drupal\entity_test\EntityTestForm",
      "delete" = "Drupal\entity_test\EntityTestDeleteForm"
    },
    "views_data" = "Drupal\views\EntityViewsData",
    "route_provider" = {
      "html" = "Drupal\Core\Entity\Routing\AdminHtmlRouteProvider",
    },
  },
  base_table = "entity_test_admin_routes",
  data_table = "entity_test_admin_routes_property_data",
  admin_permission = "administer entity_test content",
  translatable = TRUE,
  entity_keys = {
    "id" = "id",
    "uuid" = "uuid",
    "bundle" = "type",
    "label" = "name",
    "langcode" = "langcode",
  },
  links = {
    "canonical" = "/entity_test_admin_routes/manage/{entity_test_admin_routes}",
    "edit-form" = "/entity_test_admin_routes/manage/{entity_test_admin_routes}/edit",
    "delete-form" = "/entity_test/delete/entity_test_admin_routes/{entity_test_admin_routes}",
  },
)

Hierarchy

Expanded class hierarchy of EntityTestAdminRoutes

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

File

core/modules/system/tests/modules/entity_test/src/Entity/EntityTestAdminRoutes.php, line 41

Namespace

Drupal\entity_test\Entity
View source
class EntityTestAdminRoutes 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