You are here

public function CouponRedemption::defaultConfiguration in Commerce Core 8.2

Same name in this branch
  1. 8.2 modules/promotion/src/Plugin/Commerce/CheckoutPane/CouponRedemption.php \Drupal\commerce_promotion\Plugin\Commerce\CheckoutPane\CouponRedemption::defaultConfiguration()
  2. 8.2 modules/promotion/src/Plugin/Commerce/InlineForm/CouponRedemption.php \Drupal\commerce_promotion\Plugin\Commerce\InlineForm\CouponRedemption::defaultConfiguration()

Gets default configuration for this plugin.

Return value

array An associative array with the default configuration.

Overrides InlineFormBase::defaultConfiguration

File

modules/promotion/src/Plugin/Commerce/InlineForm/CouponRedemption.php, line 62

Class

CouponRedemption
Provides an inline form for redeeming a coupon.

Namespace

Drupal\commerce_promotion\Plugin\Commerce\InlineForm

Code

public function defaultConfiguration() {
  return [
    // The order_id is passed via configuration to avoid serializing the
    // order, which is loaded from scratch in the submit handler to minimize
    // chances of a conflicting save.
    'order_id' => '',
    // NULL for unlimited.
    'max_coupons' => NULL,
  ];
}