public function CheckoutFlowBase::getSteps in Commerce Core 8.2
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 CheckoutFlowInterface::getSteps
9 calls to CheckoutFlowBase::getSteps()
- CheckoutFlowBase::actions in modules/
checkout/ src/ Plugin/ Commerce/ CheckoutFlow/ CheckoutFlowBase.php - Builds the actions element for the current form.
- CheckoutFlowBase::buildForm in modules/
checkout/ src/ Plugin/ Commerce/ CheckoutFlow/ CheckoutFlowBase.php - Form constructor.
- CheckoutFlowBase::getNextStepId in modules/
checkout/ src/ Plugin/ Commerce/ CheckoutFlow/ CheckoutFlowBase.php - Gets the next step ID for the given step ID.
- CheckoutFlowBase::getPreviousStepId in modules/
checkout/ src/ Plugin/ Commerce/ CheckoutFlow/ CheckoutFlowBase.php - Gets the previous step ID for the given step ID.
- CheckoutFlowBase::getVisibleSteps in modules/
checkout/ src/ Plugin/ Commerce/ CheckoutFlow/ CheckoutFlowBase.php - Gets the visible steps.
1 method overrides CheckoutFlowBase::getSteps()
- MultistepDefault::getSteps in modules/
checkout/ src/ Plugin/ Commerce/ CheckoutFlow/ MultistepDefault.php - Gets the defined steps.
File
- modules/
checkout/ src/ Plugin/ Commerce/ CheckoutFlow/ CheckoutFlowBase.php, line 209
Class
- CheckoutFlowBase
- Provides the base checkout flow class.
Namespace
Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlowCode
public function getSteps() {
// Each checkout flow plugin defines its own steps.
// These two steps are always expected to be present.
return [
'payment' => [
'label' => $this
->t('Payment'),
'next_label' => $this
->t('Pay and complete purchase'),
'has_sidebar' => FALSE,
'hidden' => TRUE,
],
'complete' => [
'label' => $this
->t('Complete'),
'next_label' => $this
->t('Complete checkout'),
'has_sidebar' => FALSE,
],
];
}