class JsonapiTestUserHooks
Hook implementations for jsonapi_test_user.
Hierarchy
- class \Drupal\jsonapi_test_user\Hook\JsonapiTestUserHooks
Expanded class hierarchy of JsonapiTestUserHooks
File
-
core/
modules/ jsonapi/ tests/ modules/ jsonapi_test_user/ src/ Hook/ JsonapiTestUserHooks.php, line 13
Namespace
Drupal\jsonapi_test_user\HookView source
class JsonapiTestUserHooks {
/**
* Implements hook_user_format_name_alter().
*/
public function userFormatNameAlter(&$name, AccountInterface $account) {
if ($account->isAnonymous()) {
$name = 'User ' . $account->id();
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.