You are here

public function WebformComputedBase::computeValue in Webform 6.x

Same name in this branch
  1. 6.x src/Element/WebformComputedBase.php \Drupal\webform\Element\WebformComputedBase::computeValue()
  2. 6.x src/Plugin/WebformElement/WebformComputedBase.php \Drupal\webform\Plugin\WebformElement\WebformComputedBase::computeValue()
Same name and namespace in other branches
  1. 8.5 src/Plugin/WebformElement/WebformComputedBase.php \Drupal\webform\Plugin\WebformElement\WebformComputedBase::computeValue()

Compute value.

Parameters

array $element: An element.

\Drupal\webform\WebformSubmissionInterface $webform_submission: A webform submission.

Return value

string The computed value.

Overrides WebformElementComputedInterface::computeValue

3 calls to WebformComputedBase::computeValue()
WebformComputedBase::getElementSelectorInputValue in src/Plugin/WebformElement/WebformComputedBase.php
Get an element's (sub)input selector value.
WebformComputedBase::getValue in src/Plugin/WebformElement/WebformComputedBase.php
Get an element's submission value.
WebformComputedBase::postSave in src/Plugin/WebformElement/WebformComputedBase.php
Acts on a saved webform submission element before the insert or update hook is invoked.

File

src/Plugin/WebformElement/WebformComputedBase.php, line 313

Class

WebformComputedBase
Provides a base class for 'webform_computed' elements.

Namespace

Drupal\webform\Plugin\WebformElement

Code

public function computeValue(array $element, WebformSubmissionInterface $webform_submission) {
  $class = $this
    ->getFormElementClassDefinition();
  return $class::computeValue($element, $webform_submission);
}