You are here

protected function EmailWebformHandler::buildTokenTreeElement in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/WebformHandler/EmailWebformHandler.php \Drupal\webform\Plugin\WebformHandler\EmailWebformHandler::buildTokenTreeElement()

Build token tree element.

Parameters

array $token_types: (optional) An array containing token types that should be shown in the tree.

string $description: (optional) Description to appear after the token tree link.

Return value

array A render array containing a token tree link wrapped in a div.

Overrides WebformHandlerBase::buildTokenTreeElement

2 calls to EmailWebformHandler::buildTokenTreeElement()
EmailWebformHandler::buildConfigurationForm in src/Plugin/WebformHandler/EmailWebformHandler.php
Form constructor.
ScheduleEmailWebformHandler::buildConfigurationForm in modules/webform_scheduled_email/src/Plugin/WebformHandler/ScheduleEmailWebformHandler.php
Form constructor.

File

src/Plugin/WebformHandler/EmailWebformHandler.php, line 1712

Class

EmailWebformHandler
Emails a webform submission.

Namespace

Drupal\webform\Plugin\WebformHandler

Code

protected function buildTokenTreeElement(array $token_types = [
  'webform',
  'webform_submission',
], $description = NULL) {
  $description = $description ?: $this
    ->t('Use [webform_submission:values:ELEMENT_KEY:raw] to get plain text values.');
  return parent::buildTokenTreeElement($token_types, $description);
}