You are here

public function ContentEntityTypeInterface::setRevisionMetadataKey in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/ContentEntityTypeInterface.php \Drupal\Core\Entity\ContentEntityTypeInterface::setRevisionMetadataKey()
  2. 10 core/lib/Drupal/Core/Entity/ContentEntityTypeInterface.php \Drupal\Core\Entity\ContentEntityTypeInterface::setRevisionMetadataKey()

Sets a revision metadata key.

Parameters

string $key: The name of the entity revision metadata key to set.

string|null $field_name: The name of the entity field key to use for the revision metadata key. If NULL is passed, the value of the revision metadata key is unset.

Return value

$this

1 method overrides ContentEntityTypeInterface::setRevisionMetadataKey()
ContentEntityType::setRevisionMetadataKey in core/lib/Drupal/Core/Entity/ContentEntityType.php
Sets a revision metadata key.

File

core/lib/Drupal/Core/Entity/ContentEntityTypeInterface.php, line 66

Class

ContentEntityTypeInterface
Provides an interface for a content entity type and its metadata.

Namespace

Drupal\Core\Entity

Code

public function setRevisionMetadataKey($key, $field_name);