protected function RangeTestTrait::createViewDisplay in Range 8
Creates default view display.
2 calls to RangeTestTrait::createViewDisplay()
- FormatterTestBase::setUp in tests/
src/ Kernel/ Formatter/ FormatterTestBase.php - RangeTestTrait::setViewDisplayComponent in tests/
src/ Traits/ RangeTestTrait.php - Sets the display settings for a default view display.
File
- tests/
src/ Traits/ RangeTestTrait.php, line 228
Class
- RangeTestTrait
- Provides helper methods to test range fields.
Namespace
Drupal\Tests\range\TraitsCode
protected function createViewDisplay() {
if (!$this->viewDisplay) {
$values = [
'targetEntityType' => $this->entityType,
'bundle' => $this->bundle,
'mode' => 'default',
'status' => TRUE,
];
$this->viewDisplay = \Drupal::entityTypeManager()
->getStorage('entity_view_display')
->create($values);
}
}