protected static function WebformSubmissionLimitBlock::getTokenName in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/Block/WebformSubmissionLimitBlock.php \Drupal\webform\Plugin\Block\WebformSubmissionLimitBlock::getTokenName()
Get token name.
Parameters
string $prefix: Token prefix which can be 'total' or 'limit'.
string $type: The submission type which can be 'webform' or 'user'.
bool $source_entity: Flag indicating if source entity should be included in available tokens.
Return value
string A token name.
1 call to WebformSubmissionLimitBlock::getTokenName()
- WebformSubmissionLimitBlock::buildTokens in src/
Plugin/ Block/ WebformSubmissionLimitBlock.php - Build available tokens for submission limit type and source entity.
File
- src/
Plugin/ Block/ WebformSubmissionLimitBlock.php, line 583
Class
- WebformSubmissionLimitBlock
- Provides a 'Webform submission limit' block.
Namespace
Drupal\webform\Plugin\BlockCode
protected static function getTokenName($prefix = 'limit', $type = 'webform', $source_entity = FALSE) {
$parts = [
$prefix,
$type,
];
if ($source_entity) {
$parts[] = 'source_entity';
}
return implode(':', $parts);
}