You are here

public function ProviderManager::saveProviderConfiguration in Persistent URL 8

File

src/Plugin/ProviderManager.php, line 64

Class

ProviderManager

Namespace

Drupal\purl\Plugin

Code

public function saveProviderConfiguration($providerId, $method, array $settings) {
  $this
    ->deleteProviderConfiguration($providerId);
  $this->connection
    ->insert('purl_providers_settings')
    ->fields(array(
    'provider' => $providerId,
    'method' => $method,
    'settings' => serialize($settings),
  ))
    ->execute();
  $definitions = $this
    ->findDefinitions();
  $definitions[$providerId] = array_merge($definitions[$providerId], array(
    'method' => $method,
    'settings' => $settings,
  ));
  $this
    ->setCachedDefinitions($definitions);
}