protected function LingotekNodeTranslatableParagraphsAsymmetricTranslationTest::setFormDisplaysToAsymmetric in Lingotek Translation 3.7.x
Same name in this branch
- 3.7.x tests/src/Functional/LingotekNodeTranslatableParagraphsAsymmetricTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslatableParagraphsAsymmetricTranslationTest::setFormDisplaysToAsymmetric()
- 3.7.x tests/src/FunctionalJavascript/LingotekNodeTranslatableParagraphsAsymmetricTranslationTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekNodeTranslatableParagraphsAsymmetricTranslationTest::setFormDisplaysToAsymmetric()
Same name and namespace in other branches
- 8.2 tests/src/FunctionalJavascript/LingotekNodeTranslatableParagraphsAsymmetricTranslationTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekNodeTranslatableParagraphsAsymmetricTranslationTest::setFormDisplaysToAsymmetric()
- 4.0.x tests/src/FunctionalJavascript/LingotekNodeTranslatableParagraphsAsymmetricTranslationTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekNodeTranslatableParagraphsAsymmetricTranslationTest::setFormDisplaysToAsymmetric()
- 3.1.x tests/src/FunctionalJavascript/LingotekNodeTranslatableParagraphsAsymmetricTranslationTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekNodeTranslatableParagraphsAsymmetricTranslationTest::setFormDisplaysToAsymmetric()
- 3.2.x tests/src/FunctionalJavascript/LingotekNodeTranslatableParagraphsAsymmetricTranslationTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekNodeTranslatableParagraphsAsymmetricTranslationTest::setFormDisplaysToAsymmetric()
- 3.3.x tests/src/FunctionalJavascript/LingotekNodeTranslatableParagraphsAsymmetricTranslationTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekNodeTranslatableParagraphsAsymmetricTranslationTest::setFormDisplaysToAsymmetric()
- 3.4.x tests/src/FunctionalJavascript/LingotekNodeTranslatableParagraphsAsymmetricTranslationTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekNodeTranslatableParagraphsAsymmetricTranslationTest::setFormDisplaysToAsymmetric()
- 3.5.x tests/src/FunctionalJavascript/LingotekNodeTranslatableParagraphsAsymmetricTranslationTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekNodeTranslatableParagraphsAsymmetricTranslationTest::setFormDisplaysToAsymmetric()
- 3.6.x tests/src/FunctionalJavascript/LingotekNodeTranslatableParagraphsAsymmetricTranslationTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekNodeTranslatableParagraphsAsymmetricTranslationTest::setFormDisplaysToAsymmetric()
- 3.8.x tests/src/FunctionalJavascript/LingotekNodeTranslatableParagraphsAsymmetricTranslationTest.php \Drupal\Tests\lingotek\FunctionalJavascript\LingotekNodeTranslatableParagraphsAsymmetricTranslationTest::setFormDisplaysToAsymmetric()
1 call to LingotekNodeTranslatableParagraphsAsymmetricTranslationTest::setFormDisplaysToAsymmetric()
- LingotekNodeTranslatableParagraphsAsymmetricTranslationTest::setUp in tests/
src/ FunctionalJavascript/ LingotekNodeTranslatableParagraphsAsymmetricTranslationTest.php
File
- tests/
src/ FunctionalJavascript/ LingotekNodeTranslatableParagraphsAsymmetricTranslationTest.php, line 28
Class
- LingotekNodeTranslatableParagraphsAsymmetricTranslationTest
- Tests translating a node with multiple locales including translatable paragraphs.
Namespace
Drupal\Tests\lingotek\FunctionalJavascriptCode
protected function setFormDisplaysToAsymmetric() : void {
/** @var \Drupal\Core\Entity\Display\EntityFormDisplayInterface[] $formDisplays */
$formDisplays = EntityFormDisplay::loadMultiple();
foreach ($formDisplays as $formDisplay) {
$components = $formDisplay
->getComponents();
$toSave = FALSE;
foreach ($components as $id => $component) {
if (isset($component['type']) && $component['type'] === 'entity_reference_paragraphs') {
$component['type'] = 'paragraphs_classic_asymmetric';
$formDisplay
->setComponent($id, $component);
$toSave = TRUE;
}
}
if ($toSave) {
$formDisplay
->save();
}
}
}