modules/acm_checkout/src/Plugin/CheckoutFlow/CheckoutFlowBase.php
protected function actions(array $form, FormStateInterface $form_state) {
    $steps = $this->getVisibleSteps();
    $next_step_id = $this->getNextStepId();
    $previous_step_id = $this->getPreviousStepId();
    $has_next_step = $next_step_id && isset($steps[$next_step_id]['next_label']);
    $has_previous_step = $previous_step_id && isset($steps[$previous_step_id]['previous_label']);

    $actions = [
      '#type' => 'actions',
      '#access' => $has_next_step,
    ];

    if ($has_next_step) {
      $actions['next'] = [
        '#type' => 'submit',
        '#value' => $steps[$next_step_id]['next_label'],
        '#button_type' => 'primary',
        '#submit' => ['::submitForm'],
      ];

      if ($has_previous_step) {
        $label = $steps[$previous_step_id]['previous_label'];
        $actions['next']['#suffix'] = Link::createFromRoute($label, 'acm_checkout.form', [
          'step' => $previous_step_id,
        ])->toString();
      }
    }

    return $actions;
  }
protected function actions(array $form, FormStateInterface $form_state) {
    $steps = $this->getVisibleSteps();
    $next_step_id = $this->getNextStepId();
    $previous_step_id = $this->getPreviousStepId();
    $has_next_step = $next_step_id && isset($steps[$next_step_id]['next_label']);
    $has_previous_step = $previous_step_id && isset($steps[$previous_step_id]['previous_label']);

    $actions = [
      '#type' => 'actions',
      '#access' => $has_next_step,
    ];

    if ($has_next_step) {
      $actions['next'] = [
        '#type' => 'submit',
        '#value' => $steps[$next_step_id]['next_label'],
        '#button_type' => 'primary',
        '#submit' => ['::submitForm'],
      ];

      if ($has_previous_step) {
        $label = $steps[$previous_step_id]['previous_label'];
        $actions['next']['#suffix'] = Link::createFromRoute($label, 'acm_checkout.form', [
          'step' => $previous_step_id,
        ])->toString();
      }
    }

    return $actions;
  }
protected function actions ( array $ form , FormStateInterface $ form_state ) { $ steps = $ this -> getVisibleSteps ( ) ; $ next_step_id = $ this -> getNextStepId ( ) ; $ previous_step_id = $ this -> getPreviousStepId ( ) ; $ has_next_step = $ next_step_id && isset ( $ steps [ $ next_step_id ] [ 'next_label' ] ) ; $ has_previous_step = $ previous_step_id && isset ( $ steps [ $ previous_step_id ] [ 'previous_label' ] ) ; $ actions = [ '#type' => 'actions' , '#access' => $ has_next_step , ] ; if ( $ has_next_step ) { $ actions [ 'next' ] = [ '#type' => 'submit' , '#value' => $ steps [ $ next_step_id ] [ 'next_label' ] , '#button_type' => 'primary' , '#submit' => [ '::submitForm' ] , ] ; if ( $ has_previous_step ) { $ label = $ steps [ $ previous_step_id ] [ 'previous_label' ] ; $ actions [ 'next' ] [ '#suffix' ] = Link :: createFromRoute ( $ label , 'acm_checkout.form' , [ 'step' => $ previous_step_id , ] ) -> toString ( ) ; } } return $ actions ; }
Builds the actions element for the current form.

@param array $form
The current form.
@param \Drupal\Core\Form\FormStateInterface $form_state
The current form state.

@return array
The actions element.
Builds the actions element for the current form .