Version 1
[yaffs-website] / web / core / modules / system / tests / modules / entity_test / src / Entity / EntityTestMulRevChangedWithRevisionLog.php
1 <?php
2
3 namespace Drupal\entity_test\Entity;
4
5 use Drupal\Core\Entity\EntityTypeInterface;
6 use Drupal\Core\Entity\RevisionLogEntityTrait;
7 use Drupal\Core\Entity\RevisionLogInterface;
8
9 /**
10  * Defines the test entity class.
11  *
12  * @ContentEntityType(
13  *   id = "entity_test_mulrev_chnged_revlog",
14  *   label = @Translation("Test entity - revisions log and data table"),
15  *   base_table = "entity_test_mulrev_changed_revlog",
16  *   revision_table = "entity_test_mulrev_changed_revlog_revision",
17  *   entity_keys = {
18  *     "id" = "id",
19  *     "uuid" = "uuid",
20  *     "bundle" = "type",
21  *     "revision" = "revision_id",
22  *     "label" = "name",
23  *     "langcode" = "langcode",
24  *   },
25  *   revision_metadata_keys = {
26  *     "revision_user" = "revision_user",
27  *     "revision_created" = "revision_created",
28  *     "revision_log_message" = "revision_log_message"
29  *   },
30  * )
31  */
32 class EntityTestMulRevChangedWithRevisionLog extends EntityTestMulRevChanged implements RevisionLogInterface {
33
34   use RevisionLogEntityTrait;
35
36   /**
37    * {@inheritdoc}
38    */
39   public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
40     $fields = parent::baseFieldDefinitions($entity_type);
41     $fields += static::revisionLogBaseFieldDefinitions($entity_type);
42
43     return $fields;
44   }
45
46 }