I am trying to make a link on node by returning this array(The array is being formed in the function by the name buildLinks() ):
$links[$key] = array( 'title' => $definition['title'], 'href' => $this->urlGenerator->generateFromRoute('module.show_format.' . $entity->getEntityTypeId(), array('module_format' => $key, 'entity' => $entity->id())), );
but on the page the link title is appearing but the link's href value gets lost(I mean title is appearing but it is not appearing as link).What am I doing wrong?
Update: The above array is being returned over here:
return array( '#theme' => 'links__entity__module', '#links' => $this->linkBuilder->buildLinks($this->request->attributes->get($entity_type)), );
So is there is a possiblity that I am doing something wrong over here?