You are here

protected function ContentEntityStorageBase::getRevisionTranslationMergeSkippedFieldNames in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php \Drupal\Core\Entity\ContentEntityStorageBase::getRevisionTranslationMergeSkippedFieldNames()
  2. 10 core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php \Drupal\Core\Entity\ContentEntityStorageBase::getRevisionTranslationMergeSkippedFieldNames()

Returns an array of field names to skip when merging revision translations.

Return value

array An array of field names.

1 call to ContentEntityStorageBase::getRevisionTranslationMergeSkippedFieldNames()
ContentEntityStorageBase::createRevision in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
Creates a new revision starting off from the specified entity object.

File

core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php, line 366

Class

ContentEntityStorageBase
Base class for content entity storage handlers.

Namespace

Drupal\Core\Entity

Code

protected function getRevisionTranslationMergeSkippedFieldNames() {

  /** @var \Drupal\Core\Entity\ContentEntityTypeInterface $entity_type */
  $entity_type = $this
    ->getEntityType();

  // A list of known revision metadata fields which should be skipped from
  // the comparison.
  $field_names = [
    $entity_type
      ->getKey('revision'),
    $entity_type
      ->getKey('revision_translation_affected'),
  ];
  $field_names = array_merge($field_names, array_values($entity_type
    ->getRevisionMetadataKeys()));
  return $field_names;
}