You are here

protected function InsertFileTestBase::settingsToParams in Insert 8.2

Parameters

string $field_name:

array $settings:

Return value

array

1 call to InsertFileTestBase::settingsToParams()
InsertFileTestBase::updateInsertSettings in tests/src/FunctionalJavaScript/InsertFileTestBase.php

File

tests/src/FunctionalJavaScript/InsertFileTestBase.php, line 112

Class

InsertFileTestBase

Namespace

Drupal\Tests\insert\FunctionalJavascript

Code

protected function settingsToParams($field_name, array $settings) {
  $params = [];
  $values = $this
    ->flatten($settings);
  foreach ($values as $key => $value) {
    $params['fields[' . $field_name . "][settings_edit_form]" . "[third_party_settings][insert]{$key}"] = $value;
  }
  return $params;
}