Mercurial > hg > isophonics-drupal-site
comparison core/modules/link/src/LinkItemInterface.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
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 } |