You are here

public function ContentEntityBase::setRevisionTranslationAffectedEnforced in Drupal 8

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

Enforces the revision translation affected flag value.

Note that this method call will not have any influence on the storage if the value of the revision translation affected flag is NULL which is used as an indication for the storage to recompute the flag.

@internal

Parameters

bool $enforced: If TRUE, the value of the revision translation affected flag will be enforced so that on entity save the entity storage will not recompute it. Otherwise the storage will recompute it.

Return value

$this

Overrides TranslatableRevisionableInterface::setRevisionTranslationAffectedEnforced

See also

\Drupal\Core\Entity\ContentEntityInterface::setRevisionTranslationAffected()

1 call to ContentEntityBase::setRevisionTranslationAffectedEnforced()
ContentEntityBase::onChange in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Reacts to changes to a field.

File

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

Class

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

Namespace

Drupal\Core\Entity

Code

public function setRevisionTranslationAffectedEnforced($enforced) {
  $this->enforceRevisionTranslationAffected[$this->activeLangcode] = $enforced;
  return $this;
}