You are here

protected function WebformSubmissionForm::isRoute in Webform 8.5

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

Determine if the current request is a specific route (name).

Parameters

string $route_name: A route name.

Return value

bool TRUE if the current request is a specific route (name).

1 call to WebformSubmissionForm::isRoute()
WebformSubmissionForm::displayMessages in src/WebformSubmissionForm.php
Display draft, previous submission, and autofill status messages for this webform submission.

File

src/WebformSubmissionForm.php, line 2934

Class

WebformSubmissionForm
Provides a webform to collect and edit submissions.

Namespace

Drupal\webform

Code

protected function isRoute($route_name) {
  return $this->requestHandler
    ->getRouteName($this
    ->getEntity(), $this
    ->getSourceEntity(), $route_name) === $this
    ->getRouteMatch()
    ->getRouteName() ? TRUE : FALSE;
}