protected function ContentTranslationFieldSyncRevisionTest::setUntranslatableFieldWidgetsDisplay in Drupal 10
Same name and namespace in other branches
- 8 core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php \Drupal\Tests\content_translation\Kernel\ContentTranslationFieldSyncRevisionTest::setUntranslatableFieldWidgetsDisplay()
- 9 core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php \Drupal\Tests\content_translation\Kernel\ContentTranslationFieldSyncRevisionTest::setUntranslatableFieldWidgetsDisplay()
Sets untranslatable field widgets' display status.
Parameters
bool $display: Whether untranslatable field widgets should be displayed.
File
- core/
modules/ content_translation/ tests/ src/ Kernel/ ContentTranslationFieldSyncRevisionTest.php, line 392
Class
- ContentTranslationFieldSyncRevisionTest
- Tests the field synchronization logic when revisions are involved.
Namespace
Drupal\Tests\content_translation\KernelCode
protected function setUntranslatableFieldWidgetsDisplay($display) {
$entity_type_id = $this->storage
->getEntityTypeId();
$settings = [
'untranslatable_fields_hide' => !$display,
];
$this->contentTranslationManager
->setBundleTranslationSettings($entity_type_id, $entity_type_id, $settings);
/** @var \Drupal\Core\Entity\EntityTypeBundleInfo $bundle_info */
$bundle_info = $this->container
->get('entity_type.bundle.info');
$bundle_info
->clearCachedBundles();
}