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) : void {
if ($account->isAnonymous()) {
$name = 'User ' . $account->id();
}
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
JsonapiTestUserHooks::userFormatNameAlter | public | function | Implements hook_user_format_name_alter(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.