protected function OptionsLimitWebformHandler::getBooleanLimits in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_options_limit/src/Plugin/WebformHandler/OptionsLimitWebformHandler.php \Drupal\webform_options_limit\Plugin\WebformHandler\OptionsLimitWebformHandler::getBooleanLimits()
Get an associative array of boolean limits.
Return value
array An associative array of boolean limits keyed by boolean key and includes the boolean's limit, total, remaining, and status.
3 calls to OptionsLimitWebformHandler::getBooleanLimits()
- OptionsLimitWebformHandler::alterElement in modules/
webform_options_limit/ src/ Plugin/ WebformHandler/ OptionsLimitWebformHandler.php - Alter webform element.
- OptionsLimitWebformHandler::buildSummaryTable in modules/
webform_options_limit/ src/ Plugin/ WebformHandler/ OptionsLimitWebformHandler.php - Build summary table.
- OptionsLimitWebformHandler::validateBooleanElement in modules/
webform_options_limit/ src/ Plugin/ WebformHandler/ OptionsLimitWebformHandler.php - Validate a boolean element with limit(s).
File
- modules/
webform_options_limit/ src/ Plugin/ WebformHandler/ OptionsLimitWebformHandler.php, line 1197
Class
- OptionsLimitWebformHandler
- Webform options and boolean (boolean) limit handler.
Namespace
Drupal\webform_options_limit\Plugin\WebformHandlerCode
protected function getBooleanLimits() {
$element = $this
->getElement();
$key = $element['#webform_key'];
$label = $element['#title'];
$limit = $this->configuration['limit'];
$total = $this
->getBooleanTotal();
return [
$key => $this
->getLimitInformation($label, $limit, $total),
];
}