5 use Drupal\Core\Field\FieldItemInterface;
8 * Defines an interface for the link field item.
10 interface LinkItemInterface extends FieldItemInterface {
13 * Specifies whether the field supports only internal URLs.
15 const LINK_INTERNAL = 0x01;
18 * Specifies whether the field supports only external URLs.
20 const LINK_EXTERNAL = 0x10;
23 * Specifies whether the field supports both internal and external URLs.
25 const LINK_GENERIC = 0x11;
28 * Determines if a link is external.
31 * TRUE if the link is external, FALSE otherwise.
33 public function isExternal();
36 * Gets the URL object.
38 * @return \Drupal\Core\Url
39 * Returns a Url object.
41 public function getUrl();