function ContentTranslationUITestBase::getChangedFieldName

Same name in this branch
  1. 8.9.x core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php \Drupal\Tests\content_translation\Functional\ContentTranslationUITestBase::getChangedFieldName()
Same name in other branches
  1. 9 core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php \Drupal\Tests\content_translation\Functional\ContentTranslationUITestBase::getChangedFieldName()
  2. 10 core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php \Drupal\Tests\content_translation\Functional\ContentTranslationUITestBase::getChangedFieldName()
  3. 11.x core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php \Drupal\Tests\content_translation\Functional\ContentTranslationUITestBase::getChangedFieldName()

Returns the name of the field that implements the changed timestamp.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity being tested.

Return value

string The field name.

1 call to ContentTranslationUITestBase::getChangedFieldName()
ContentTranslationUITestBase::doTestTranslationChanged in core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php
Tests the basic translation workflow.

File

core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php, line 500

Class

ContentTranslationUITestBase
Tests the Content Translation UI.

Namespace

Drupal\content_translation\Tests

Code

protected function getChangedFieldName($entity) {
    return $entity->hasField('content_translation_changed') ? 'content_translation_changed' : 'changed';
}

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