You are here

protected function WebformSubmissionListBuilder::getRouteParameters in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/WebformSubmissionListBuilder.php \Drupal\webform\WebformSubmissionListBuilder::getRouteParameters()

Get route parameters for the webform or webform source entity.

Parameters

\Drupal\webform\WebformSubmissionInterface $webform_submission: A webform submission.

Return value

array Route parameters for the webform or webform source entity.

File

src/WebformSubmissionListBuilder.php, line 1167

Class

WebformSubmissionListBuilder
Provides a list controller for webform submission entity.

Namespace

Drupal\webform

Code

protected function getRouteParameters(WebformSubmissionInterface $webform_submission) {
  $route_parameters = [
    'webform_submission' => $webform_submission
      ->id(),
  ];
  if ($this->sourceEntity) {
    $route_parameters[$this->sourceEntity
      ->getEntityTypeId()] = $this->sourceEntity
      ->id();
  }
  return $route_parameters;
}