You are here

public function ProviderManager::getProviderConfiguration in Persistent URL 8

1 call to ProviderManager::getProviderConfiguration()
ProviderManager::findDefinitions in src/Plugin/ProviderManager.php
Finds plugin definitions.

File

src/Plugin/ProviderManager.php, line 49

Class

ProviderManager

Namespace

Drupal\purl\Plugin

Code

public function getProviderConfiguration($id) {
  $result = $this->connection
    ->select('purl_providers_settings', 'p')
    ->fields('p', array(
    'provider',
    'method',
    'settings',
  ))
    ->condition('provider', $id)
    ->execute();
  $row = $result
    ->fetch();
  return array(
    'method' => $row ? $row->method : null,
    'settings' => $row ? unserialize($row->settings) : array(),
  );
}