You are here

protected function ProviderUsingHandlerBase::getArguments in Geocoder 8.3

Same name and namespace in other branches
  1. 8.2 src/ProviderUsingHandlerBase.php \Drupal\geocoder\ProviderUsingHandlerBase::getArguments()

Builds a list of arguments to be used by the handler.

Return value

array The list of arguments for handler instantiation.

2 calls to ProviderUsingHandlerBase::getArguments()
ProviderUsingHandlerBase::getHandler in src/ProviderUsingHandlerBase.php
Returns the provider handler.
ProviderUsingHandlerWithAdapterBase::getArguments in src/ProviderUsingHandlerWithAdapterBase.php
Builds a list of arguments to be used by the handler.
1 method overrides ProviderUsingHandlerBase::getArguments()
ProviderUsingHandlerWithAdapterBase::getArguments in src/ProviderUsingHandlerWithAdapterBase.php
Builds a list of arguments to be used by the handler.

File

src/ProviderUsingHandlerBase.php, line 117

Class

ProviderUsingHandlerBase
Provides a base class for providers using handlers.

Namespace

Drupal\geocoder

Code

protected function getArguments() : array {
  $arguments = [];
  foreach ($this
    ->getPluginDefinition()['arguments'] as $key => $argument) {

    // No default value has been passed.
    if (\is_string($key)) {
      $config_name = $key;
      $default_value = $argument;
    }
    else {
      $config_name = $argument;
      $default_value = NULL;
    }
    $arguments[] = $this->configuration[$config_name] ?? $default_value;
  }
  return $arguments;
}