Is there a way of the Title/Label/Name of an unknown entity type via 1 method?
At the moment if it’s a node, I have to use $entity->getTitle()
, for a user it’s $entity->getAccountName()
, for a taxonomy term it’d be $entity->getName()
In my head they all feel like the same piece of information, is there a way of retrieving it without having to write out possibilities for each type of entity?