You are here

protected function LinkWidget::supportsInternalLinks in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php \Drupal\link\Plugin\Field\FieldWidget\LinkWidget::supportsInternalLinks()

Indicates enabled support for link to routes.

Return value

bool Returns TRUE if the LinkItem field is configured to support links to routes, otherwise FALSE.

1 call to LinkWidget::supportsInternalLinks()
LinkWidget::formElement in core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php
Returns the form for a single field widget.

File

core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php, line 331

Class

LinkWidget
Plugin implementation of the 'link' widget.

Namespace

Drupal\link\Plugin\Field\FieldWidget

Code

protected function supportsInternalLinks() {
  $link_type = $this
    ->getFieldSetting('link_type');
  return (bool) ($link_type & LinkItemInterface::LINK_INTERNAL);
}