class EntityTestMulRevPub

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

Defines the test entity class.

Plugin annotation


@ContentEntityType(
  id = "entity_test_mulrevpub",
  label = @Translation("Test entity - revisions, data table, and published interface"),
  handlers = {
    "view_builder" = "Drupal\entity_test\EntityTestViewBuilder",
    "access" = "Drupal\entity_test\EntityTestAccessControlHandler",
    "form" = {
      "default" = "Drupal\entity_test\EntityTestForm",
      "delete" = "Drupal\entity_test\EntityTestDeleteForm",
      "delete-multiple-confirm" = "Drupal\Core\Entity\Form\DeleteMultipleForm"
    },
    "views_data" = "Drupal\views\EntityViewsData",
    "route_provider" = {
      "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider",
    },
  },
  base_table = "entity_test_mulrevpub",
  data_table = "entity_test_mulrevpub_property_data",
  revision_table = "entity_test_mulrevpub_revision",
  revision_data_table = "entity_test_mulrevpub_property_revision",
  admin_permission = "administer entity_test content",
  translatable = TRUE,
  show_revision_ui = TRUE,
  entity_keys = {
    "id" = "id",
    "uuid" = "uuid",
    "bundle" = "type",
    "revision" = "revision_id",
    "label" = "name",
    "langcode" = "langcode",
    "published" = "status",
  },
  links = {
    "add-form" = "/entity_test_mulrevpub/add",
    "canonical" = "/entity_test_mulrevpub/manage/{entity_test_mulrevpub}",
    "delete-form" = "/entity_test/delete/entity_test_mulrevpub/{entity_test_mulrevpub}",
    "delete-multiple-form" = "/entity_test/delete",
    "edit-form" = "/entity_test_mulrevpub/manage/{entity_test_mulrevpub}/edit",
    "revision" = "/entity_test_mulrevpub/{entity_test_mulrevpub}/revision/{entity_test_mulrevpub_revision}/view",
  }
)

Hierarchy

Expanded class hierarchy of EntityTestMulRevPub

8 files declare their use of EntityTestMulRevPub
ContentModerationSyncingTest.php in core/modules/content_moderation/tests/src/Kernel/ContentModerationSyncingTest.php
ContentTranslationWorkflowsTest.php in core/modules/content_translation/tests/src/Functional/ContentTranslationWorkflowsTest.php
DeleteActionTest.php in core/tests/Drupal/KernelTests/Core/Action/DeleteActionTest.php
DeleteMultipleFormTest.php in core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php
EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php in core/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php

... See full list

File

core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevPub.php, line 54

Namespace

Drupal\entity_test\Entity
View source
class EntityTestMulRevPub extends EntityTestMulRev implements EntityPublishedInterface {
  use EntityPublishedTrait;
  
  /**
   * {@inheritdoc}
   */
  public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
    return parent::baseFieldDefinitions($entity_type) + static::publishedBaseFieldDefinitions($entity_type);
  }

}

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