protected function Token::prepareMultisort in Token 8
Extracts data from the token data for use in array_multisort().
Parameters
array $token_info: List of tokens or token types, each element must have a name key.
Return value
string[] List of the names keyed by the token key.
1 call to Token::prepareMultisort()
- Token::getInfo in src/
Token.php - Returns metadata describing supported tokens.
File
- src/
Token.php, line 86
Class
- Token
- Service to retrieve token information.
Namespace
Drupal\tokenCode
protected function prepareMultisort($token_info) {
$by_name = [];
foreach ($token_info as $key => $token_info_element) {
$by_name[$key] = $token_info_element['name'];
}
return $by_name;
}