You are here

private function SettingsDataTrait::convertToPostFormSettings in Acquia Lift Connector 8

Same name and namespace in other branches
  1. 8.3 src/Tests/SettingsDataTrait.php \Drupal\acquia_lift\Tests\SettingsDataTrait::convertToPostFormSettings()

Convert to post form settings.

Parameters

array $settings:

string $prefix:

Return value

array A valid front end credential settings array.

1 call to SettingsDataTrait::convertToPostFormSettings()
SettingsTest::testAdminSettingsForm in src/Tests/SettingsTest.php

File

src/Tests/SettingsDataTrait.php, line 126
Contains \Drupal\acquia_lift\Tests\SettingsDataTrait.

Class

SettingsDataTrait
Settings Data Trait.

Namespace

Drupal\acquia_lift\Tests

Code

private function convertToPostFormSettings($settings, $prefix) {
  $post_form_settings = [];
  foreach ($settings as $setting_name => $setting_value) {
    $post_form_settings[$prefix . '[' . $setting_name . ']'] = $setting_value;
  }
  return $post_form_settings;
}