public static function WebformDateHelper::getIntervalText in Webform 8.5
Same name and namespace in other branches
- 6.x src/Utility/WebformDateHelper.php \Drupal\webform\Utility\WebformDateHelper::getIntervalText()
Get interval text.
Parameters
int|null $interval: An interval.
Return value
string An intervals' text.
2 calls to WebformDateHelper::getIntervalText()
- WebformSubmissionLimitBlock::getIntervalText in src/
Plugin/ Block/ WebformSubmissionLimitBlock.php - Get submission limit interval text.
- webform_tokens in ./
webform.tokens.inc - Implements hook_tokens().
File
- src/
Utility/ WebformDateHelper.php, line 149
Class
- WebformDateHelper
- Helper class webform date helper methods.
Namespace
Drupal\webform\UtilityCode
public static function getIntervalText($interval) {
$interval = (string) $interval ?: '';
$intervals = self::getIntervalOptionsFlattened();
return isset($intervals[$interval]) ? $intervals[$interval] : $intervals[''];
}