You are here

function SimpleGateway::defaultConfiguration in SMS simple gateway 8

Gets default configuration for this plugin.

Return value

array An associative array with the default configuration.

Overrides SmsGatewayPluginBase::defaultConfiguration

File

src/Plugin/SmsGateway/SimpleGateway.php, line 61

Class

SimpleGateway
This plugin handles sending SMSes through most GET & POST based SMS Gateways.

Namespace

Drupal\sms_simplegateway\Plugin\SmsGateway

Code

function defaultConfiguration() {
  parent::defaultConfiguration();
  $default_config = \Drupal::config('sms_simplegateway.settings');
  return [
    'method' => $default_config
      ->get('method'),
    'authorization' => $default_config
      ->get('authorization'),
    'content_type' => $default_config
      ->get('content_type'),
    'base_url' => $default_config
      ->get('base_url'),
    'user_field' => $default_config
      ->get('user_field'),
    'user_value' => $default_config
      ->get('user_value'),
    'pass_field' => $default_config
      ->get('pass_field'),
    'pass_value' => $default_config
      ->get('pass_value'),
    'sender_field' => $default_config
      ->get('sender_field'),
    'sender_value' => $default_config
      ->get('sender_value'),
    'number_field' => $default_config
      ->get('number_field'),
    'number_prefix' => $default_config
      ->get('number_prefix'),
    'message_field' => $default_config
      ->get('message_field'),
    'extra_params' => $default_config
      ->get('extra_params'),
    'receive_number_field' => $default_config
      ->get('receive_number_field'),
    'receive_message_field' => $default_config
      ->get('receive_message_field'),
    'receive_gwnumber_field' => $default_config
      ->get('receive_gwnumber_field'),
  ];
}