function NodeTranslationUITest::getFormSubmitSuffix
Same name in other branches
- 9 core/modules/node/tests/src/Functional/NodeTranslationUITest.php \Drupal\Tests\node\Functional\NodeTranslationUITest::getFormSubmitSuffix()
- 8.9.x core/modules/node/tests/src/Functional/NodeTranslationUITest.php \Drupal\Tests\node\Functional\NodeTranslationUITest::getFormSubmitSuffix()
- 10 core/modules/node/tests/src/Functional/NodeTranslationUITest.php \Drupal\Tests\node\Functional\NodeTranslationUITest::getFormSubmitSuffix()
Overrides ContentTranslationUITestBase::getFormSubmitSuffix
1 call to NodeTranslationUITest::getFormSubmitSuffix()
- NodeTranslationUITest::doTestPublishedStatus in core/
modules/ node/ tests/ src/ Functional/ NodeTranslationUITest.php - Tests the translation publishing status.
File
-
core/
modules/ node/ tests/ src/ Functional/ NodeTranslationUITest.php, line 457
Class
- NodeTranslationUITest
- Tests the Node Translation UI.
Namespace
Drupal\Tests\node\FunctionalCode
protected function getFormSubmitSuffix(EntityInterface $entity, $langcode) : string {
if (!$entity->isNew() && $entity->isTranslatable()) {
$translations = $entity->getTranslationLanguages();
if ((count($translations) > 1 || !isset($translations[$langcode])) && ($field = $entity->getFieldDefinition('status'))) {
return ' ' . ($field->isTranslatable() ? '(this translation)' : '(all translations)');
}
}
return '';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.