public function WebformElementBase::getElementSelectorInputValue in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/WebformElementBase.php \Drupal\webform\Plugin\WebformElementBase::getElementSelectorInputValue()
Get an element's (sub)input selector value.
Parameters
string $selector: CSS :input selector.
string $trigger: Trigger from #states.
array $element: An element.
\Drupal\webform\WebformSubmissionInterface $webform_submission: A webform submission.
Return value
mixed The element input's value.
Overrides WebformElementInterface::getElementSelectorInputValue
1 call to WebformElementBase::getElementSelectorInputValue()
- OptionsBase::getElementSelectorInputValue in src/
Plugin/ WebformElement/ OptionsBase.php - Get an element's (sub)input selector value.
5 methods override WebformElementBase::getElementSelectorInputValue()
- DateList::getElementSelectorInputValue in src/
Plugin/ WebformElement/ DateList.php - Get an element's (sub)input selector value.
- DateTime::getElementSelectorInputValue in src/
Plugin/ WebformElement/ DateTime.php - Get an element's (sub)input selector value.
- OptionsBase::getElementSelectorInputValue in src/
Plugin/ WebformElement/ OptionsBase.php - Get an element's (sub)input selector value.
- WebformComputedBase::getElementSelectorInputValue in src/
Plugin/ WebformElement/ WebformComputedBase.php - Get an element's (sub)input selector value.
- WebformHeight::getElementSelectorInputValue in src/
Plugin/ WebformElement/ WebformHeight.php - Get an element's (sub)input selector value.
File
- src/
Plugin/ WebformElementBase.php, line 2214
Class
- WebformElementBase
- Provides a base class for a webform element.
Namespace
Drupal\webform\PluginCode
public function getElementSelectorInputValue($selector, $trigger, array $element, WebformSubmissionInterface $webform_submission) {
if ($this
->isComposite()) {
$input_name = WebformSubmissionConditionsValidator::getSelectorInputName($selector);
$composite_key = WebformSubmissionConditionsValidator::getInputNameAsArray($input_name, 1);
if ($composite_key) {
return $this
->getRawValue($element, $webform_submission, [
'composite_key' => $composite_key,
]);
}
else {
return NULL;
}
}
else {
return $this
->getRawValue($element, $webform_submission);
}
}