You are here

public function EntityCloneSettingsManager::setFormSettings in Entity Clone 8

Set the entity clone settings.

Parameters

array $settings: The settings from the form.

File

src/EntityCloneSettingsManager.php, line 84

Class

EntityCloneSettingsManager
Manage entity clone configuration.

Namespace

Drupal\entity_clone

Code

public function setFormSettings(array $settings) {
  if (isset($settings['table'])) {
    array_walk_recursive($settings['table'], function (&$item) {
      if ($item == '1') {
        $item = TRUE;
      }
      else {
        $item = FALSE;
      }
    });
    $this->editableConfig
      ->set('form_settings', $settings['table'])
      ->save();
  }
}