You are here

protected function EntityDisplaySetupTrait::setFormComponentSettings 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::setFormComponentSettings()

Set component settings for the form.

Parameters

string $type: The component to change settings for.

array $settings: The settings to use.

1 call to EntityDisplaySetupTrait::setFormComponentSettings()
WidgetTest::testVideoEmbedFieldDefaultWidget in tests/src/Functional/WidgetTest.php
Test the input widget.

File

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

Class

EntityDisplaySetupTrait
A trait for manipulating entity display.

Namespace

Drupal\Tests\video_embed_field\Functional

Code

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