You are here

protected function EntityDisplaySetupTrait::setDisplayComponentSettings in Video Embed Field 8

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/EntityDisplaySetupTrait.php \Drupal\Tests\video_embed_field\Functional\EntityDisplaySetupTrait::setDisplayComponentSettings()

Set component settings for the display.

Parameters

string $type: The component to change settings for.

array $settings: The settings to use.

3 calls to EntityDisplaySetupTrait::setDisplayComponentSettings()
AutoplayPermissionTest::testAutoplay in tests/src/Functional/AutoplayPermissionTest.php
Test the autoplay permission works.
ColorboxFormatterTest::testColorboxFormatter in tests/src/FunctionalJavascript/ColorboxFormatterTest.php
Test the colorbox formatter.
LazyLoadFormatterTest::testColorboxFormatter in tests/src/FunctionalJavascript/LazyLoadFormatterTest.php
Test the lazy load formatter.

File

tests/src/Functional/EntityDisplaySetupTrait.php, line 78

Class

EntityDisplaySetupTrait
A trait for manipulating entity display.

Namespace

Drupal\Tests\video_embed_field\Functional

Code

protected function setDisplayComponentSettings($type, $settings = []) {
  $this->entityDisplay
    ->setComponent($this->fieldName, [
    'type' => $type,
    'settings' => $settings,
  ])
    ->save();
}