I have a custom entity (Person) with these fields: ID, nom, prenom, telephoneportable, estactive, adherentid, userID, created, changed.
I created it with baseFieldDefinitions.
adherentid is a 'entity_reference' link to another custom content entity 'Adherent'.
userID are is a 'entity_reference' link to standard Drupal 'User' entity.
In the PersonListBuilder, I try to have these ids showed as links to the corresponding entities.
Here is the code for userID (and it's working fine):
$row['userid']['data'] = array( '#theme' => 'username', '#account' => $entity->getUser(), );
What should be the code for adherentid (can't make it work so far):
$row['adherentid']['data'] = array( '#theme' => '???', '#account' => $entity->getAdherent(), );
Thanks in advance