You are here

protected function WebformHandlerBase::buildTokenTreeElement in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/WebformHandlerBase.php \Drupal\webform\Plugin\WebformHandlerBase::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.

4 calls to WebformHandlerBase::buildTokenTreeElement()
ActionWebformHandler::buildConfigurationForm in src/Plugin/WebformHandler/ActionWebformHandler.php
Form constructor.
EmailWebformHandler::buildTokenTreeElement in src/Plugin/WebformHandler/EmailWebformHandler.php
Build token tree element.
RemotePostWebformHandler::buildTokenTreeElement in src/Plugin/WebformHandler/RemotePostWebformHandler.php
Build token tree element.
SettingsWebformHandler::buildConfigurationForm in src/Plugin/WebformHandler/SettingsWebformHandler.php
Form constructor.
2 methods override WebformHandlerBase::buildTokenTreeElement()
EmailWebformHandler::buildTokenTreeElement in src/Plugin/WebformHandler/EmailWebformHandler.php
Build token tree element.
RemotePostWebformHandler::buildTokenTreeElement in src/Plugin/WebformHandler/RemotePostWebformHandler.php
Build token tree element.

File

src/Plugin/WebformHandlerBase.php, line 761

Class

WebformHandlerBase
Provides a base class for a webform handler.

Namespace

Drupal\webform\Plugin

Code

protected function buildTokenTreeElement(array $token_types = [
  'webform',
  'webform_submission',
], $description = NULL) {
  return $this->tokenManager
    ->buildTreeElement($token_types, $description);
}