How do I add a link to the #title property of a checkbox? I created a custom module for Drupal 8.6, and I want to post a link to my terms and conditions.

This is the code I am using.

namespace Drupal\commerce_agree_cgv\Plugin\Commerce\CheckoutPane;

use Drupal\Core\Form\FormStateInterface;
use Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\CheckoutPaneBase;
use Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\CheckoutPaneInterface;
use Drupal\commerce_cart\Controller\CartController;
use Drupal\node\Entity\Node;
use Drupal\Core\Link;
use Drupal\Core\Url;

/**
 * Provides the completion message pane.
 *
 * @CommerceCheckoutPane(
 *   id = "agree_cgv",
 *   label = @Translation("Agree CGV"),
 *   default_step = "review",
 * )
 */
class AgreeCGV extends CheckoutPaneBase implements CheckoutPaneInterface {

  /**
   * {@inheritdoc}
   */
  public function buildPaneForm(array $pane_form, FormStateInterface $form_state, array &amp;$complete_form) {
    $link = Link::createFromRoute($this-&gt;t('my terms'), 'entity.node.canonical', ['node' =&gt; 1], ['attributes' =&gt; ['target' =&gt; '_blank']])-&gt;toString();
    $pane_form['cgv'] = [
      '#type' =&gt; 'checkbox',
      '#default_value' =&gt; FALSE,
      '#title' =&gt; $this-&gt;t('I have read and accept', ['the general terms and conditions of business' =&gt; $link]),
      '#required' =&gt; TRUE,
      '#weight' =&gt; $this-&gt;getWeight(),
    ];
    return $pane_form;
  }

}


The link does not work. When I go to my page, the link is missing.


  


The server runs on PHP 7.2.

How do I display the link?
The code is not calling $this-&gt;t() passing the correct arguments. The correct code would be the following one.

$pane_form['cgv'] = [
  '#type' =&gt; 'checkbox',
  '#default_value' =&gt; FALSE,
  '#title' =&gt; $this-&gt;t('I have read and accept &lt;a href=":general-terms"&gt;the general terms and conditions of business&lt;/a&gt;', [':general-terms' =&gt; Url::fromRoute('entity.node.canonical', ['node' =&gt; 1], ['attributes' =&gt; ['target' =&gt; '_blank']])-&gt;toString()]),
  '#required' =&gt; TRUE,
  '#weight' =&gt; $this-&gt;getWeight(),
];