You are here

protected function WebformSubmissionsPurgeForm::getSubmissionTotal in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Form/WebformSubmissionsPurgeForm.php \Drupal\webform\Form\WebformSubmissionsPurgeForm::getSubmissionTotal()

Get total number of submissions.

Return value

int Total number of submissions.

Overrides WebformSubmissionsDeleteFormBase::getSubmissionTotal

2 calls to WebformSubmissionsPurgeForm::getSubmissionTotal()
WebformSubmissionsPurgeForm::buildForm in src/Form/WebformSubmissionsPurgeForm.php
Form constructor.
WebformSubmissionsPurgeForm::getDescription in src/Form/WebformSubmissionsPurgeForm.php
Returns additional text to display as a description.

File

src/Form/WebformSubmissionsPurgeForm.php, line 125

Class

WebformSubmissionsPurgeForm
Webform for webform submission purge webform.

Namespace

Drupal\webform\Form

Code

protected function getSubmissionTotal() {
  if (!isset($this->submissionTotal)) {
    $this->submissionTotal = $this->entityTypeManager
      ->getStorage('webform_submission')
      ->getQuery()
      ->count()
      ->execute();
  }
  return $this->submissionTotal;
}