public Token::generate($type, array $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata)
Generates replacement values for a list of tokens.
Parameters
string $type: The type of token being replaced. 'node', 'user', and 'date' are common.
array $tokens: An array of tokens to be replaced, keyed by the literal text of the token as it appeared in the source text.
array $data: An array of keyed objects. For simple replacement scenarios: 'node', 'user', and others are commo