You are here

public function BuyXGetY::defaultConfiguration in Commerce Core 8.2

Gets default configuration for this plugin.

Return value

array An associative array with the default configuration.

Overrides PromotionOfferBase::defaultConfiguration

File

modules/promotion/src/Plugin/Commerce/PromotionOffer/BuyXGetY.php, line 113

Class

BuyXGetY
Provides the "Buy X Get Y" offer for orders.

Namespace

Drupal\commerce_promotion\Plugin\Commerce\PromotionOffer

Code

public function defaultConfiguration() {
  return [
    'buy_quantity' => 1,
    'buy_conditions' => [],
    'get_quantity' => 1,
    'get_conditions' => [],
    'get_auto_add' => FALSE,
    'offer_type' => 'percentage',
    'offer_percentage' => '0',
    'offer_amount' => NULL,
    'offer_limit' => '0',
  ] + parent::defaultConfiguration();
}