public function WebformElementBase::isEmptyExcluded in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/WebformElementBase.php \Drupal\webform\Plugin\WebformElementBase::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 WebformElementInterface::isEmptyExcluded
1 call to WebformElementBase::isEmptyExcluded()
- WebformElementBase::build in src/
Plugin/ WebformElementBase.php - Build an element as text or HTML.
1 method overrides WebformElementBase::isEmptyExcluded()
- Checkbox::isEmptyExcluded in src/
Plugin/ WebformElement/ Checkbox.php - Checks if an empty element is excluded.
File
- src/
Plugin/ WebformElementBase.php, line 1854
Class
- WebformElementBase
- Provides a base class for a webform element.
Namespace
Drupal\webform\PluginCode
public function isEmptyExcluded(array $element, array $options) {
$options += [
'exclude_empty' => TRUE,
];
return !empty($options['exclude_empty']);
}