I am not a great POO specialist, maybe my ask will seems stupid x)
When I create new field from the user UI administration, I would like find quickly this field when I work from my IDE in customs modules.
So, I think I need add a custom method for the User Class, like :
public function mycustomfield_value($user){
return $user->mycustomfield->value;
}
From my IDE, if I type "$user->" the IDE auto-complete must show me "$user->mycustomfield_value(..." method.
My ask is : how can I add this method ? I must create a new Class implement/extends User Drupal 8 Class ? I don't know how can I do that..