protected function WebformSubmissionLimitBlock::getTotal in Webform 6.x
Same name and namespace in other branches
- 8.5 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 387
Class
- WebformSubmissionLimitBlock
- Provides a 'Webform submission limit' block.
Namespace
Drupal\webform\Plugin\BlockCode
protected function getTotal() {
return $this->entityTypeManager
->getStorage('webform_submission')
->getTotal($this
->getWebform(), $this
->getSourceEntity(), $this
->getCurrentUser(), [
'interval' => $this
->getInterval(),
]);
}