You are here

protected function CheckoutFlowBase::isStepVisible in Commerce Core 8.2

Gets whether the given step is visible.

Parameters

string $step_id: The step ID.

Return value

bool TRUE if the step is visible, FALSE otherwise.

4 calls to CheckoutFlowBase::isStepVisible()
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.
CheckoutFlowBase::redirectToStep in modules/checkout/src/Plugin/Commerce/CheckoutFlow/CheckoutFlowBase.php
Redirects an order to a specific step in the checkout.
1 method overrides CheckoutFlowBase::isStepVisible()
CheckoutFlowWithPanesBase::isStepVisible in modules/checkout/src/Plugin/Commerce/CheckoutFlow/CheckoutFlowWithPanesBase.php
Gets whether the given step is visible.

File

modules/checkout/src/Plugin/Commerce/CheckoutFlow/CheckoutFlowBase.php, line 253

Class

CheckoutFlowBase
Provides the base checkout flow class.

Namespace

Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow

Code

protected function isStepVisible($step_id) {

  // All available steps are visible by default.
  $step_ids = array_keys($this
    ->getSteps());
  return in_array($step_id, $step_ids);
}