You are here

public function CheckoutPaneBase::defaultConfiguration in Commerce Core 8.2

Gets default configuration for this plugin.

Return value

array An associative array with the default configuration.

Overrides ConfigurableInterface::defaultConfiguration

7 calls to CheckoutPaneBase::defaultConfiguration()
CheckoutPaneBase::setConfiguration in modules/checkout/src/Plugin/Commerce/CheckoutPane/CheckoutPaneBase.php
Sets the configuration for this plugin instance.
CompletionMessage::defaultConfiguration in modules/checkout/src/Plugin/Commerce/CheckoutPane/CompletionMessage.php
Gets default configuration for this plugin.
ContactInformation::defaultConfiguration in modules/checkout/src/Plugin/Commerce/CheckoutPane/ContactInformation.php
Gets default configuration for this plugin.
CouponRedemption::defaultConfiguration in modules/promotion/src/Plugin/Commerce/CheckoutPane/CouponRedemption.php
Gets default configuration for this plugin.
Login::defaultConfiguration in modules/checkout/src/Plugin/Commerce/CheckoutPane/Login.php
Gets default configuration for this plugin.

... See full list

6 methods override CheckoutPaneBase::defaultConfiguration()
CompletionMessage::defaultConfiguration in modules/checkout/src/Plugin/Commerce/CheckoutPane/CompletionMessage.php
Gets default configuration for this plugin.
ContactInformation::defaultConfiguration in modules/checkout/src/Plugin/Commerce/CheckoutPane/ContactInformation.php
Gets default configuration for this plugin.
CouponRedemption::defaultConfiguration in modules/promotion/src/Plugin/Commerce/CheckoutPane/CouponRedemption.php
Gets default configuration for this plugin.
Login::defaultConfiguration in modules/checkout/src/Plugin/Commerce/CheckoutPane/Login.php
Gets default configuration for this plugin.
OrderSummary::defaultConfiguration in modules/checkout/src/Plugin/Commerce/CheckoutPane/OrderSummary.php
Gets default configuration for this plugin.

... See full list

File

modules/checkout/src/Plugin/Commerce/CheckoutPane/CheckoutPaneBase.php, line 102

Class

CheckoutPaneBase
Provides the base checkout pane class.

Namespace

Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane

Code

public function defaultConfiguration() {
  $available_steps = array_keys($this->checkoutFlow
    ->getSteps());
  $available_steps[] = '_sidebar';
  $default_step = $this->pluginDefinition['default_step'];
  if (!$default_step || !in_array($default_step, $available_steps)) {

    // The specified default step isn't available on the parent checkout flow.
    $default_step = '_disabled';
  }
  return [
    'step' => $default_step,
    'weight' => 10,
  ];
}