Security update for Core, with self-updated composer
[yaffs-website] / web / core / lib / Drupal / Core / Entity / ContentEntityTypeInterface.php
1 <?php
2
3 namespace Drupal\Core\Entity;
4
5 /**
6  * Provides an interface for a content entity type and its metadata.
7  */
8 interface ContentEntityTypeInterface extends EntityTypeInterface {
9
10   /**
11    * Gets an array of entity revision metadata keys.
12    *
13    * @param bool $include_backwards_compatibility_field_names
14    *   (optional and deprecated) Whether to provide the revision keys on a
15    *   best-effort basis by looking at the base fields defined by the entity
16    *   type. Note that this parameter will be removed in Drupal 9.0.0. Defaults
17    *   to TRUE.
18    *
19    * @return array
20    *   An array describing how the Field API can extract revision metadata
21    *   information of this entity type:
22    *   - revision_log_message: The name of the property that contains description
23    *     of the changes that were made in the current revision.
24    *   - revision_user: The name of the property that contains the user ID of
25    *     the author of the current revision.
26    *   - revision_created: The name of the property that contains the timestamp
27    *     of the current revision.
28    */
29   public function getRevisionMetadataKeys($include_backwards_compatibility_field_names = TRUE);
30
31   /**
32    * Gets a specific entity revision metadata key.
33    *
34    * @param string $key
35    *   The name of the entity revision metadata key to return.
36    *
37    * @return string|bool
38    *   The entity revision metadata key, or FALSE if it does not exist.
39    *
40    * @see self::getRevisionMetadataKeys()
41    */
42   public function getRevisionMetadataKey($key);
43
44   /**
45    * Indicates if a given entity revision metadata key exists.
46    *
47    * @param string $key
48    *   The name of the entity revision metadata key to check.
49    *
50    * @return bool
51    *   TRUE if a given entity revision metadata key exists, FALSE otherwise.
52    */
53   public function hasRevisionMetadataKey($key);
54
55 }