use Drupal\Core\Url; $rendable_link = [ '#type' => 'link', '#title' => $this->t('Link title'), '#url' => Url::fromRoute('YOUR_ROUTE'), ];