public function Checkbox::isEmptyExcluded in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/WebformElement/Checkbox.php \Drupal\webform\Plugin\WebformElement\Checkbox::isEmptyExcluded()
Checks if an empty element is excluded.
Parameters
array $element: An element.
array $options: An array of options.
Return value
bool TRUE if an empty element is excluded.
Overrides WebformElementBase::isEmptyExcluded
1 call to Checkbox::isEmptyExcluded()
- Checkbox::build in src/
Plugin/ WebformElement/ Checkbox.php - Build an element as text or HTML.
File
- src/
Plugin/ WebformElement/ Checkbox.php, line 59
Class
- Checkbox
- Provides a 'checkbox' element.
Namespace
Drupal\webform\Plugin\WebformElementCode
public function isEmptyExcluded(array $element, array $options) {
$options += [
'exclude_empty_checkbox' => FALSE,
];
return $this
->getElementProperty($element, 'exclude_empty') ?: $options['exclude_empty_checkbox'];
}