class EntityTestAdminRoutes

Same name in other branches
  1. 9 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestAdminRoutes.php \Drupal\entity_test\Entity\EntityTestAdminRoutes
  2. 10 core/modules/system/tests/modules/entity_test/src/Entity/EntityTestAdminRoutes.php \Drupal\entity_test\Entity\EntityTestAdminRoutes
  3. 11.x 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 {

}

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