You are here

protected function WebformSubmissionListBuilder::getSubmissionViewType in Webform 8.5

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

Get the submission view type for the current route.

Return value

string The submission view type for the current route.

2 calls to WebformSubmissionListBuilder::getSubmissionViewType()
WebformSubmissionListBuilder::getSubmissionViews in src/WebformSubmissionListBuilder.php
Get submission views applicable for the current route and user.
WebformSubmissionListBuilder::isSubmissionViewResultsReplaced in src/WebformSubmissionListBuilder.php
Determine if the submission view(s) replaced the default results table.

File

src/WebformSubmissionListBuilder.php, line 1185

Class

WebformSubmissionListBuilder
Provides a list controller for webform submission entity.

Namespace

Drupal\webform

Code

protected function getSubmissionViewType() {
  if (!$this->webform) {
    return 'global';
  }
  elseif ($this->sourceEntity && $this->sourceEntity
    ->getEntityTypeId() === 'node') {
    return 'node';
  }
  else {
    return 'webform';
  }
}