You are here

protected function YamlFormSubmissionListBuilder::getSubmissionRouteName in YAML Form 8

Get submission route name based on the current route.

Return value

string The submission route name which can be either 'yamlform.user.submission' or 'yamlform_submission.canonical.

2 calls to YamlFormSubmissionListBuilder::getSubmissionRouteName()
YamlFormSubmissionListBuilder::buildRow in src/YamlFormSubmissionListBuilder.php
Builds a row for an entity in the entity listing.
YamlFormSubmissionListBuilder::buildRowColumn in src/YamlFormSubmissionListBuilder.php
Build row column.

File

src/YamlFormSubmissionListBuilder.php, line 519

Class

YamlFormSubmissionListBuilder
Provides a list controller for yamlform submission entity.

Namespace

Drupal\yamlform

Code

protected function getSubmissionRouteName() {
  return strpos(\Drupal::routeMatch()
    ->getRouteName(), 'yamlform.user.submissions') !== FALSE ? 'yamlform.user.submission' : 'yamlform_submission.canonical';
}