function LayoutBuilderTranslationTest::setUpViewDisplay
Set up the View Display.
1 call to LayoutBuilderTranslationTest::setUpViewDisplay()
- LayoutBuilderTranslationTest::setUp in core/modules/ layout_builder/ tests/ src/ Functional/ LayoutBuilderTranslationTest.php 
File
- 
              core/modules/ layout_builder/ tests/ src/ Functional/ LayoutBuilderTranslationTest.php, line 160 
Class
- LayoutBuilderTranslationTest
- Tests that the Layout Builder works with translated content.
Namespace
Drupal\Tests\layout_builder\FunctionalCode
protected function setUpViewDisplay() {
  EntityViewDisplay::create([
    'targetEntityType' => $this->entityTypeId,
    'bundle' => $this->bundle,
    'mode' => 'default',
    'status' => TRUE,
  ])
    ->setComponent($this->fieldName, [
    'type' => 'string',
  ])
    ->enableLayoutBuilder()
    ->setOverridable()
    ->save();
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
