You are here

public function RemotePostWebformHandler::defaultConfiguration in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/WebformHandler/RemotePostWebformHandler.php \Drupal\webform\Plugin\WebformHandler\RemotePostWebformHandler::defaultConfiguration()

Gets default configuration for this plugin.

Return value

array An associative array with the default configuration.

Overrides WebformHandlerBase::defaultConfiguration

File

src/Plugin/WebformHandler/RemotePostWebformHandler.php, line 147

Class

RemotePostWebformHandler
Webform submission remote post handler.

Namespace

Drupal\webform\Plugin\WebformHandler

Code

public function defaultConfiguration() {

  // @todo Determine why entity field manager dependency can't be injected.
  $field_names = array_keys(\Drupal::service('entity_field.manager')
    ->getBaseFieldDefinitions('webform_submission'));
  $excluded_data = array_combine($field_names, $field_names);
  return [
    'method' => 'POST',
    'type' => 'x-www-form-urlencoded',
    'excluded_data' => $excluded_data,
    'custom_data' => '',
    'custom_options' => '',
    'file_data' => TRUE,
    'cast' => FALSE,
    'debug' => FALSE,
    // States.
    'completed_url' => '',
    'completed_custom_data' => '',
    'updated_url' => '',
    'updated_custom_data' => '',
    'deleted_url' => '',
    'deleted_custom_data' => '',
    'draft_created_url' => '',
    'draft_created_custom_data' => '',
    'draft_updated_url' => '',
    'draft_updated_custom_data' => '',
    'converted_url' => '',
    'converted_custom_data' => '',
    // Custom response messages.
    'message' => '',
    'messages' => [],
    // Custom response redirect URL.
    'error_url' => '',
  ];
}