class EntityTestMulRevChangedWithRevisionLog

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

Defines the test entity class.

Plugin annotation


@ContentEntityType(
  id = "entity_test_mulrev_changed_rev",
  label = @Translation("Test entity - revisions log and data table"),
  base_table = "entity_test_mulrev_changed_revlog",
  revision_table = "entity_test_mulrev_changed_revlog_revision",
  entity_keys = {
    "id" = "id",
    "uuid" = "uuid",
    "bundle" = "type",
    "revision" = "revision_id",
    "label" = "name",
    "langcode" = "langcode",
  },
  revision_metadata_keys = {
    "revision_user" = "revision_user",
    "revision_created" = "revision_created",
    "revision_log_message" = "revision_log_message"
  },
)

Hierarchy

Expanded class hierarchy of EntityTestMulRevChangedWithRevisionLog

File

core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevChangedWithRevisionLog.php, line 32

Namespace

Drupal\entity_test\Entity
View source
class EntityTestMulRevChangedWithRevisionLog extends EntityTestMulRevChanged implements RevisionLogInterface {
  use RevisionLogEntityTrait;
  
  /**
   * {@inheritdoc}
   */
  public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
    $fields = parent::baseFieldDefinitions($entity_type);
    $fields += static::revisionLogBaseFieldDefinitions($entity_type);
    return $fields;
  }

}

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