function Token::setInfo
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Utility/Token.php \Drupal\Core\Utility\Token::setInfo()
- 10 core/lib/Drupal/Core/Utility/Token.php \Drupal\Core\Utility\Token::setInfo()
- 11.x core/lib/Drupal/Core/Utility/Token.php \Drupal\Core\Utility\Token::setInfo()
Sets metadata describing supported tokens.
Parameters
array $tokens: Token metadata that has an identical structure to the return value of hook_token_info().
See also
File
-
core/
lib/ Drupal/ Core/ Utility/ Token.php, line 452
Class
- Token
- Drupal placeholder/token replacement system.
Namespace
Drupal\Core\UtilityCode
public function setInfo(array $tokens) {
$this->tokenInfo = $tokens;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.