You are here

public function FillPdfAdminFormHelper::getAdminTokenForm in FillPDF 5.0.x

Same name and namespace in other branches
  1. 8.4 src/Service/FillPdfAdminFormHelper.php \Drupal\fillpdf\Service\FillPdfAdminFormHelper::getAdminTokenForm()

Returns render array for a link to a token tree shown as a dialog.

Parameters

string[]|string $token_types: (optional) Array of token types. Defaults to 'all'. Note that it's the caller's duty to translate entity types into token types.

Return value

array Render array.

Overrides FillPdfAdminFormHelperInterface::getAdminTokenForm

File

src/Service/FillPdfAdminFormHelper.php, line 69

Class

FillPdfAdminFormHelper
Various helper methods used in FillPDF administrative forms.

Namespace

Drupal\fillpdf\Service

Code

public function getAdminTokenForm($token_types = 'all') {
  return [
    '#theme' => 'token_tree_link',
    '#token_types' => $token_types,
    '#global_types' => TRUE,
  ];
}