-
Improvement
-
Resolution: Fixed
-
Minor
-
4.0.0-a1, 3.2.4
-
None
Currently the Group Helper class consists of one function, "get_name()", that checks if a language string is set or not. While we nicely inject it as a service in our extensions and use that class, it feels rather useless.
In order for it to be useful, I feel like it should have three more functions:
- get_rank()
- get_avatar()
- get_name_string()
Currently the group's rank is trying to be retrieved through phpbb_get_user_rank() and this does not work (as mentioned in an other issue), so groups will need their own function.
The group avatar is already available through phpbb_get_group_avatar(), but for its completeness can and should be included in this class aswell, just as a wrapper function.
And the last function is pretty much the same as get_username_string(), but then for a group name. With the various modes that the user's function also provides.
All this together would make the Group Helper class actually helpful.