protected function RangeTestTrait::createFormDisplay in Range 8
Creates default form display.
2 calls to RangeTestTrait::createFormDisplay()
- RangeTestTrait::setFormDisplayComponent in tests/
src/ Traits/ RangeTestTrait.php - Sets the display settings for a default form display.
- WidgetTest::testFieldWidget in tests/
src/ Kernel/ Widget/ WidgetTest.php - Tests widget.
File
- tests/
src/ Traits/ RangeTestTrait.php, line 191
Class
- RangeTestTrait
- Provides helper methods to test range fields.
Namespace
Drupal\Tests\range\TraitsCode
protected function createFormDisplay() {
if (!$this->formDisplay) {
$values = [
'targetEntityType' => $this->entityType,
'bundle' => $this->bundle,
'mode' => 'default',
'status' => TRUE,
];
$this->formDisplay = \Drupal::entityTypeManager()
->getStorage('entity_form_display')
->create($values);
}
}