You are here

public function WebformSubmissionExporter::requiresBatch in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/WebformSubmissionExporter.php \Drupal\webform\WebformSubmissionExporter::requiresBatch()

Determine if webform submissions must be exported using batch processing.

Return value

bool TRUE if webform submissions must be exported using batch processing.

Overrides WebformSubmissionExporterInterface::requiresBatch

File

src/WebformSubmissionExporter.php, line 1111

Class

WebformSubmissionExporter
Webform submission exporter.

Namespace

Drupal\webform

Code

public function requiresBatch() {

  // Get the unfiltered total number of submissions for the webform and
  // source entity.
  $total = $this
    ->getSubmissionStorage()
    ->getTotal($this
    ->getWebform(), $this
    ->getSourceEntity());
  return $total > $this
    ->getBatchLimit() ? TRUE : FALSE;
}