function ContentEntityBase::setRevisionTranslationAffectedEnforced

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::setRevisionTranslationAffectedEnforced()
  2. 8.9.x core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::setRevisionTranslationAffectedEnforced()
  3. 10 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

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 419

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

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