function FormWizardBase::getNextParameters

Same name in other branches
  1. 4.0.x src/Wizard/FormWizardBase.php \Drupal\ctools\Wizard\FormWizardBase::getNextParameters()

Overrides FormWizardInterface::getNextParameters

3 calls to FormWizardBase::getNextParameters()
FormWizardBase::actions in src/Wizard/FormWizardBase.php
Generates action elements for navigating between the operation steps.
FormWizardBase::ajaxSubmit in src/Wizard/FormWizardBase.php
FormWizardBase::submitForm in src/Wizard/FormWizardBase.php
Form submission handler.

File

src/Wizard/FormWizardBase.php, line 193

Class

FormWizardBase
The base class for all form wizard.

Namespace

Drupal\ctools\Wizard

Code

public function getNextParameters($cached_values) {
    // Get the steps by key.
    $operations = $this->getOperations($cached_values);
    $steps = array_keys($operations);
    // Get the steps after the current step.
    $after = array_slice($operations, array_search($this->getStep($cached_values), $steps) + 1);
    // Get the steps after the current step by key.
    $after_keys = array_keys($after);
    $step = reset($after_keys);
    if (!$step) {
        $keys = array_keys($operations);
        $step = end($keys);
    }
    return [
        'machine_name' => $this->getMachineName(),
        'step' => $step,
        'js' => 'nojs',
    ];
}