You are here

public function OptionsLimitWebformHandler::defaultConfiguration in Webform 8.5

Same name and namespace in other branches
  1. 6.x modules/webform_options_limit/src/Plugin/WebformHandler/OptionsLimitWebformHandler.php \Drupal\webform_options_limit\Plugin\WebformHandler\OptionsLimitWebformHandler::defaultConfiguration()

Gets default configuration for this plugin.

Return value

array An associative array with the default configuration.

Overrides WebformHandlerBase::defaultConfiguration

File

modules/webform_options_limit/src/Plugin/WebformHandler/OptionsLimitWebformHandler.php, line 137

Class

OptionsLimitWebformHandler
Webform options and boolean (boolean) limit handler.

Namespace

Drupal\webform_options_limit\Plugin\WebformHandler

Code

public function defaultConfiguration() {
  return [
    'element_key' => '',
    // Boolean limit.
    'limit' => NULL,
    // Options limit.
    'limits' => [],
    'limit_reached_message' => '@name is not available',
    'limit_source_entity' => TRUE,
    'limit_user' => FALSE,
    'option_none_action' => 'disable',
    'option_message_display' => 'label',
    'option_multiple_message' => '[@remaining remaining]',
    'option_single_message' => '[@remaining remaining]',
    'option_unlimited_message' => '[Unlimited]',
    'option_none_message' => '[@remaining remaining]',
    'option_error_message' => '@name: @label is unavailable.',
    'tableselect_header' => '',
  ];
}