You are here

protected function WebformSubmissionLimitBlock::getTotal in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/Block/WebformSubmissionLimitBlock.php \Drupal\webform\Plugin\Block\WebformSubmissionLimitBlock::getTotal()

Get total number of submissions for selected limit type.

Return value

int The total number of submissions.

2 calls to WebformSubmissionLimitBlock::getTotal()
WebformSubmissionLimitBlock::build in src/Plugin/Block/WebformSubmissionLimitBlock.php
Builds and returns the renderable array for this block plugin.
WebformSubmissionLimitBlock::replaceTokens in src/Plugin/Block/WebformSubmissionLimitBlock.php
Replace tokens in text.

File

src/Plugin/Block/WebformSubmissionLimitBlock.php, line 419

Class

WebformSubmissionLimitBlock
Provides a 'Webform submission limit' block.

Namespace

Drupal\webform\Plugin\Block

Code

protected function getTotal() {
  return $this->entityTypeManager
    ->getStorage('webform_submission')
    ->getTotal($this
    ->getWebform(), $this
    ->getSourceEntity(), $this
    ->getCurrentUser(), [
    'interval' => $this
      ->getInterval(),
  ]);
}