function ContentModerationState::getFieldsToSkipFromTranslationChangesCheck

Same name in other branches
  1. 9 core/modules/content_moderation/src/Entity/ContentModerationState.php \Drupal\content_moderation\Entity\ContentModerationState::getFieldsToSkipFromTranslationChangesCheck()
  2. 10 core/modules/content_moderation/src/Entity/ContentModerationState.php \Drupal\content_moderation\Entity\ContentModerationState::getFieldsToSkipFromTranslationChangesCheck()
  3. 11.x core/modules/content_moderation/src/Entity/ContentModerationState.php \Drupal\content_moderation\Entity\ContentModerationState::getFieldsToSkipFromTranslationChangesCheck()

Overrides ContentEntityBase::getFieldsToSkipFromTranslationChangesCheck

File

core/modules/content_moderation/src/Entity/ContentModerationState.php, line 203

Class

ContentModerationState
Defines the Content moderation state entity.

Namespace

Drupal\content_moderation\Entity

Code

protected function getFieldsToSkipFromTranslationChangesCheck() {
    $field_names = parent::getFieldsToSkipFromTranslationChangesCheck();
    // We need to skip the parent entity revision ID, since that will always
    // change on every save, otherwise every translation would be marked as
    // affected regardless of actual changes.
    $field_names[] = 'content_entity_revision_id';
    return $field_names;
}

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