Security update to Drupal 8.4.6
[yaffs-website] / web / core / modules / link / src / LinkItemInterface.php
1 <?php
2
3 namespace Drupal\link;
4
5 use Drupal\Core\Field\FieldItemInterface;
6
7 /**
8  * Defines an interface for the link field item.
9  */
10 interface LinkItemInterface extends FieldItemInterface {
11
12   /**
13    * Specifies whether the field supports only internal URLs.
14    */
15   const LINK_INTERNAL = 0x01;
16
17   /**
18    * Specifies whether the field supports only external URLs.
19    */
20   const LINK_EXTERNAL = 0x10;
21
22   /**
23    * Specifies whether the field supports both internal and external URLs.
24    */
25   const LINK_GENERIC = 0x11;
26
27   /**
28    * Determines if a link is external.
29    *
30    * @return bool
31    *   TRUE if the link is external, FALSE otherwise.
32    */
33   public function isExternal();
34
35   /**
36    * Gets the URL object.
37    *
38    * @return \Drupal\Core\Url
39    *   Returns a Url object.
40    */
41   public function getUrl();
42
43 }