You are here

public function ContentEntityBase::setRevisionTranslationAffected in Zircon Profile 8.0

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

Marks the current revision translation as affected.

Parameters

bool|null $affected: The flag value. A NULL value can be specified to reset the current value and make sure a new value will be computed by the system.

Return value

$this

Overrides ContentEntityInterface::setRevisionTranslationAffected

File

core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 316
Contains \Drupal\Core\Entity\ContentEntityBase.

Class

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

Namespace

Drupal\Core\Entity

Code

public function setRevisionTranslationAffected($affected) {
  $field_name = 'revision_translation_affected';
  if ($this
    ->hasField($field_name)) {
    $this
      ->set($field_name, $affected);
  }
  return $this;
}