Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Core / Entity / EditorialContentEntityBase.php
1 <?php
2
3 namespace Drupal\Core\Entity;
4
5 /**
6  * Provides a base entity class with extended revision and publishing support.
7  *
8  * @ingroup entity_api
9  */
10 abstract class EditorialContentEntityBase extends ContentEntityBase implements EntityChangedInterface, EntityPublishedInterface, RevisionLogInterface {
11
12   use EntityChangedTrait;
13   use EntityPublishedTrait;
14   use RevisionLogEntityTrait;
15
16   /**
17    * {@inheritdoc}
18    */
19   public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
20     $fields = parent::baseFieldDefinitions($entity_type);
21
22     // Add the revision metadata fields.
23     $fields += static::revisionLogBaseFieldDefinitions($entity_type);
24
25     // Add the published field.
26     $fields += static::publishedBaseFieldDefinitions($entity_type);
27
28     return $fields;
29   }
30
31 }