WebformComputedToken.php in Webform 8.5
File
src/Element/WebformComputedToken.php
View source
<?php
namespace Drupal\webform\Element;
use Drupal\webform\WebformSubmissionInterface;
class WebformComputedToken extends WebformComputedBase {
public static function computeValue(array $element, WebformSubmissionInterface $webform_submission) {
$mode = static::getMode($element);
$token_manager = \Drupal::service('webform.token_manager');
return $token_manager
->replace($element['#template'], $webform_submission, [], [
'html' => $mode === WebformComputedInterface::MODE_HTML,
]);
}
}