3 namespace Drupal\Core\Entity;
6 * Provides an interface for a content entity type and its metadata.
8 interface ContentEntityTypeInterface extends EntityTypeInterface {
11 * Gets an array of entity revision metadata keys.
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
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.
29 public function getRevisionMetadataKeys($include_backwards_compatibility_field_names = TRUE);
32 * Gets a specific entity revision metadata key.
35 * The name of the entity revision metadata key to return.
38 * The entity revision metadata key, or FALSE if it does not exist.
40 * @see self::getRevisionMetadataKeys()
42 public function getRevisionMetadataKey($key);
45 * Indicates if a given entity revision metadata key exists.
48 * The name of the entity revision metadata key to check.
51 * TRUE if a given entity revision metadata key exists, FALSE otherwise.
53 public function hasRevisionMetadataKey($key);