Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\webform\Element;
|
||||
|
||||
use Drupal\webform\WebformSubmissionInterface;
|
||||
|
||||
/**
|
||||
* Provides an item to display computed webform submission values using tokens.
|
||||
*
|
||||
* @RenderElement("webform_computed_token")
|
||||
*/
|
||||
class WebformComputedToken extends WebformComputedBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function processValue(array $element, WebformSubmissionInterface $webform_submission) {
|
||||
$mode = static::getMode($element);
|
||||
|
||||
/** @var \Drupal\webform\WebformTokenManagerInterface $token_manager */
|
||||
$token_manager = \Drupal::service('webform.token_manager');
|
||||
|
||||
// Replace tokens in value.
|
||||
return $token_manager->replace($element['#value'], $webform_submission, [], ['html' => ($mode == static::MODE_HTML)]);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in a new issue