function ContentEntityStorageBase::getRevisionTranslationMergeSkippedFieldNames

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php \Drupal\Core\Entity\ContentEntityStorageBase::getRevisionTranslationMergeSkippedFieldNames()
  2. 8.9.x core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php \Drupal\Core\Entity\ContentEntityStorageBase::getRevisionTranslationMergeSkippedFieldNames()
  3. 11.x 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 460

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.