protected function WebformSubmissionLimitBlock::getLimit in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/Block/WebformSubmissionLimitBlock.php \Drupal\webform\Plugin\Block\WebformSubmissionLimitBlock::getLimit()
Get submission limit.
Return value
int|bool The submission limit or FALSE if not submission limit is defined.
3 calls to WebformSubmissionLimitBlock::getLimit()
- WebformSubmissionLimitBlock::blockAccess in src/
Plugin/ Block/ WebformSubmissionLimitBlock.php - Indicates whether the block should be shown.
- 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 385
Class
- WebformSubmissionLimitBlock
- Provides a 'Webform submission limit' block.
Namespace
Drupal\webform\Plugin\BlockCode
protected function getLimit() {
$name = $this->configuration['source_entity'] ? 'entity_' : '';
$name .= $this->configuration['type'] === 'user' ? 'limit_user' : 'limit_total';
return $this
->getWebform()
->getSetting($name) ?: FALSE;
}