public function PayPalCheckout::getSteps in Commerce PayPal 8
Gets the defined steps.
Return value
array An array of step definitions, keyed by step ID. Possible keys:
- label: The label of the step.
- previous_label: The label shown on the button that returns the customer back to this step.
- next_label: The label shown on the button that sends the customer to this step.
- has_sidebar: Whether the step has a sidebar.
- hidden: Whether the step is hidden. Hidden steps aren't shown in the checkout progress block until they are reached.
Note: If the previous_label or next_label keys are missing, the corresponding buttons will not be shown to the customer.
Overrides CheckoutFlowBase::getSteps
File
- src/
Plugin/ Commerce/ CheckoutFlow/ PayPalCheckout.php, line 21
Class
- PayPalCheckout
- Provides a custom checkout flow for use by PayPal Checkout.
Namespace
Drupal\commerce_paypal\Plugin\Commerce\CheckoutFlowCode
public function getSteps() {
// Note that previous_label and next_label are not the labels
// shown on the step itself. Instead, they are the labels shown
// when going back to the step, or proceeding to the step.
return [
'order_information' => [
'label' => $this
->t('Order information'),
'has_sidebar' => TRUE,
'previous_label' => $this
->t('Go back'),
],
'review' => [
'label' => $this
->t('Review'),
'next_label' => $this
->t('Continue to review'),
'previous_label' => $this
->t('Go back'),
'has_sidebar' => TRUE,
],
] + parent::getSteps();
}