You are here

protected function ContentEntityBase::getFieldsToSkipFromTranslationChangesCheck in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::getFieldsToSkipFromTranslationChangesCheck()
  2. 9 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::getFieldsToSkipFromTranslationChangesCheck()

Returns an array of field names to skip in ::hasTranslationChanges.

Return value

array An array of field names.

1 call to ContentEntityBase::getFieldsToSkipFromTranslationChangesCheck()
ContentEntityBase::hasTranslationChanges in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Determines if the current translation of the entity has unsaved changes.

File

core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 1402

Class

ContentEntityBase
Implements Entity Field API specific enhancements to the Entity class.

Namespace

Drupal\Core\Entity

Code

protected function getFieldsToSkipFromTranslationChangesCheck() {
  $bundle = $this
    ->bundle();
  if (!isset(static::$fieldsToSkipFromTranslationChangesCheck[$this->entityTypeId][$bundle])) {
    static::$fieldsToSkipFromTranslationChangesCheck[$this->entityTypeId][$bundle] = $this
      ->traitGetFieldsToSkipFromTranslationChangesCheck($this);
  }
  return static::$fieldsToSkipFromTranslationChangesCheck[$this->entityTypeId][$bundle];
}