public function WebformElementBase::hasValue in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElementBase.php \Drupal\webform\Plugin\WebformElementBase::hasValue()
Determine if an element's has a submission value.
Parameters
array $element: An element.
\Drupal\webform\WebformSubmissionInterface $webform_submission: A webform submission.
array $options: An array of options.
Return value
bool TRUE if them element's has a submission value.
Overrides WebformElementInterface::hasValue
5 calls to WebformElementBase::hasValue()
- WebformCompositeBase::formatHtmlItem in src/
Plugin/ WebformElement/ WebformCompositeBase.php - Format an element's value as HTML.
- WebformCompositeBase::formatTextItem in src/
Plugin/ WebformElement/ WebformCompositeBase.php - Format an element's value as text.
- WebformElementBase::format in src/
Plugin/ WebformElementBase.php - Format an element's value as HTML or plain text.
- WebformHeight::hasValue in src/
Plugin/ WebformElement/ WebformHeight.php - Determine if an element's has a submission value.
- WebformMapping::formatTextItem in src/
Plugin/ WebformElement/ WebformMapping.php - Format an element's value as text.
2 methods override WebformElementBase::hasValue()
- WebformAttachmentBase::hasValue in modules/
webform_attachment/ src/ Plugin/ WebformElement/ WebformAttachmentBase.php - Determine if an element's has a submission value.
- WebformHeight::hasValue in src/
Plugin/ WebformElement/ WebformHeight.php - Determine if an element's has a submission value.
File
- src/
Plugin/ WebformElementBase.php, line 1757
Class
- WebformElementBase
- Provides a base class for a webform element.
Namespace
Drupal\webform\PluginCode
public function hasValue(array $element, WebformSubmissionInterface $webform_submission, array $options = []) {
$value = $this
->getValue($element, $webform_submission, $options);
return $value === '' || $value === NULL || is_array($value) && empty($value) ? FALSE : TRUE;
}