You are here

public function WebformRevisionsRequest::getUrl in Config Entity Revisions 1.x

Same name and namespace in other branches
  1. 8.2 modules/webform_revisions/src/WebformRevisionsRequest.php \Drupal\webform_revisions\WebformRevisionsRequest::getUrl()
  2. 8 modules/webform_revisions/src/WebformRevisionsRequest.php \Drupal\webform_revisions\WebformRevisionsRequest::getUrl()

Get the URL for a form/submission and source entity.

Parameters

\Drupal\Core\Entity\EntityInterface $webform_entity: A webform or webform submission.

\Drupal\Core\Entity\EntityInterface|null $source_entity: A webform submission's source entity.

string $route_name: The route name.

array $route_options: The route options.

Return value

\Drupal\Core\Url The URL for a form/submission and source entity.

Overrides WebformRequest::getUrl

File

modules/webform_revisions/src/WebformRevisionsRequest.php, line 239

Class

WebformRevisionsRequest
Handles webform requests.

Namespace

Drupal\webform_revisions

Code

public function getUrl(EntityInterface $webform_entity, EntityInterface $source_entity = NULL, $route_name, array $route_options = []) {
  $route_name = $this
    ->getRouteName($webform_entity, $source_entity, $route_name);
  $route_parameters = $this
    ->getRouteParameters($webform_entity, $source_entity);
  return Url::fromRoute($route_name, $route_parameters, $route_options);
}