drupal 8 render array code example
Example: drupal 8 link render array
$url = Url::fromRoute('entity.node.edit_form', array('node' => NID));
$link = [
'#type' => 'link',
'#url' => $url,
'#title' => t('This link was rendered')
];
$url = Url::fromRoute('entity.node.edit_form', array('node' => NID));
$link = [
'#type' => 'link',
'#url' => $url,
'#title' => t('This link was rendered')
];