You are here

public function FormsSteps::getLastStep in Forms Steps 8

Retrieve the last step defined on a forms steps entity.

Parameters

string $steps: The forms_steps steps' IDs.

Return value

\Drupal\forms_steps\StepInterface The forms_steps step.

Overrides FormsStepsInterface::getLastStep

File

src/Entity/FormsSteps.php, line 412

Class

FormsSteps
FormsSteps configuration entity to persistently store configuration.

Namespace

Drupal\forms_steps\Entity

Code

public function getLastStep($steps = NULL) {
  if ($steps === NULL) {
    $steps = $this
      ->getSteps();
  }
  return end($steps);
}