RouteHelper.php in Forms Steps 8
Namespace
Drupal\forms_steps\ServiceFile
src/Service/RouteHelper.phpView source
<?php
namespace Drupal\forms_steps\Service;
use Drupal\forms_steps\Step;
/**
* Class RouteHelper.
*
* @package Drupal\forms_steps\Service
*/
class RouteHelper {
/**
* Return the internal URL.
*
* @param \Drupal\forms_steps\Step $step
* The step in question.
* @param string $instance_id
* The instance of the step to target.
*
* @return string
* The internal URL.
*/
public static function getStepUrl(Step $step, string $instance_id) {
return $step
->url() . "/{$instance_id}";
}
}
Classes
Name | Description |
---|---|
RouteHelper | Class RouteHelper. |