You are here

public function LinkItem::isExternal in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/link/src/Plugin/Field/FieldType/LinkItem.php \Drupal\link\Plugin\Field\FieldType\LinkItem::isExternal()

Determines if a link is external.

Return value

bool TRUE if the link is external, FALSE otherwise.

Overrides LinkItemInterface::isExternal

File

core/modules/link/src/Plugin/Field/FieldType/LinkItem.php, line 159

Class

LinkItem
Plugin implementation of the 'link' field type.

Namespace

Drupal\link\Plugin\Field\FieldType

Code

public function isExternal() {
  return $this
    ->getUrl()
    ->isExternal();
}