diff --git a/core/modules/link/src/Plugin/Field/FieldFormatter/LinkFormatter.php b/core/modules/link/src/Plugin/Field/FieldFormatter/LinkFormatter.php index 0ead7f6..8819fe3 100644 --- a/core/modules/link/src/Plugin/Field/FieldFormatter/LinkFormatter.php +++ b/core/modules/link/src/Plugin/Field/FieldFormatter/LinkFormatter.php @@ -39,6 +39,7 @@ class LinkFormatter extends FormatterBase implements ContainerFactoryPluginInter * @var \Drupal\Core\Path\PathValidatorInterface */ protected $pathValidator; + /** * {@inheritdoc} */ @@ -184,7 +185,6 @@ public function viewElements(FieldItemListInterface $items) { // By default use the full URL as the link text. $url = $this->buildUrl($item); $link_title = $url->toString(); - debug($link_title); // If the title field value is available, use it for the link text. if (empty($settings['url_only']) && !empty($item->title)) { @@ -241,8 +241,8 @@ public function viewElements(FieldItemListInterface $items) { * An Url object. */ protected function buildUrl(LinkItemInterface $item) { - // @todo Maybe get rid of the usage of https://www.drupal.org/node/2405551 - // if needed. + // @todo Consider updating the usage of the path validator with whatever + // gets added in https://www.drupal.org/node/2405551. $url = $this->pathValidator->getUrlIfValidWithoutAccessCheck($item->uri) ?: Url::fromRoute(''); $settings = $this->getSettings();