You are here

public function TreeBuilderInterface::buildTree in Token 8

Build a tree array of tokens used for themeing or information.

Parameters

string $token_type: The token type.

array $options: (optional) An associative array of additional options, with the following elements:

  • 'flat' (defaults to FALSE): Set to true to generate a flat list of token information. Otherwise, child tokens will be inside the 'children' parameter of a token.
  • 'restricted' (defaults to FALSE): Set to true to how restricted tokens.
  • 'depth' (defaults to 4): Maximum number of token levels to recurse.

Return value

array The token information constructed in a tree or flat list form depending on $options['flat'].

1 method overrides TreeBuilderInterface::buildTree()
TreeBuilder::buildTree in src/TreeBuilder.php
Build a tree array of tokens used for themeing or information.

File

src/TreeBuilderInterface.php, line 30

Class

TreeBuilderInterface

Namespace

Drupal\token

Code

public function buildTree($token_type, array $options = []);