How to get a link to entity_reference in ListBuilder? 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' =&gt; 'username',
'#account' =&gt; $entity-&gt;getUser(),
);


What should be the code for adherentid (can't make it work so far):

$row['adherentid']['data'] = array(
'#theme' =&gt; '???',
'#account' =&gt; $entity-&gt;getAdherent(),
);


Thanks in advance
One possibility is to use the Link render element, and by using the canonical link for the Adherent entity. This assumes that the Adherent entity type definition has a canonical link, and that the route is defined in your module's routing YAML.

$row['adherentid']['data'] = array(
 '#type' =&gt; 'link',
 '#url' =&gt; Uri::fromRoute('entity.adherent.canonical', ['association_adherent' =&gt; $id]),
 '#title' =&gt; 'My link',
);


Another possibility is to render the field, and use the display mode that provides a link to the entity using the entity label. However this is less accessible in the documentation to look up within a reasonable time.