You are here

protected function ContentEntityChangedTest::getRevisionTranslationAffectedFlag in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Entity/ContentEntityChangedTest.php \Drupal\system\Tests\Entity\ContentEntityChangedTest::getRevisionTranslationAffectedFlag()

Retrieves the revision translation affected flag value.

Parameters

\Drupal\entity_test\Entity\EntityTestMulRevChanged $entity: The entity object to be checked.

Return value

bool The flag value.

1 call to ContentEntityChangedTest::getRevisionTranslationAffectedFlag()
ContentEntityChangedTest::testRevisionChanged in core/modules/system/src/Tests/Entity/ContentEntityChangedTest.php
Tests revisionable EntityChangedInterface functionality.

File

core/modules/system/src/Tests/Entity/ContentEntityChangedTest.php, line 538
Contains \Drupal\system\Tests\Entity\ContentEntityChangedTest.

Class

ContentEntityChangedTest
Tests basic EntityChangedInterface functionality.

Namespace

Drupal\system\Tests\Entity

Code

protected function getRevisionTranslationAffectedFlag(EntityTestMulRevChanged $entity) {
  $query = $this->mulRevChangedStorage
    ->getQuery();
  $ids = $query
    ->condition('revision_translation_affected', 1, '=', $entity
    ->language()
    ->getId())
    ->execute();
  $id = reset($ids);
  return (bool) ($id == $entity
    ->id());
}