public function Token::getTypeInfo in Token 8
Returns metadata describing supported token types.
Parameters
$token_type: The token type for which the metadata is required.
Return value
array[] An array of token type information from hook_token_info() for the specified token type.
Overrides TokenInterface::getTypeInfo
See also
File
- src/
Token.php, line 108
Class
- Token
- Service to retrieve token information.
Namespace
Drupal\tokenCode
public function getTypeInfo($token_type) {
if (empty($this->tokenInfo)) {
$this
->getInfo();
}
return isset($this->tokenInfo['types'][$token_type]) ? $this->tokenInfo['types'][$token_type] : NULL;
}