Mercurial > hg > isophonics-drupal-site
annotate core/modules/link/src/LinkItemInterface.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\link; |
Chris@0 | 4 |
Chris@0 | 5 use Drupal\Core\Field\FieldItemInterface; |
Chris@0 | 6 |
Chris@0 | 7 /** |
Chris@0 | 8 * Defines an interface for the link field item. |
Chris@0 | 9 */ |
Chris@0 | 10 interface LinkItemInterface extends FieldItemInterface { |
Chris@0 | 11 |
Chris@0 | 12 /** |
Chris@0 | 13 * Specifies whether the field supports only internal URLs. |
Chris@0 | 14 */ |
Chris@0 | 15 const LINK_INTERNAL = 0x01; |
Chris@0 | 16 |
Chris@0 | 17 /** |
Chris@0 | 18 * Specifies whether the field supports only external URLs. |
Chris@0 | 19 */ |
Chris@0 | 20 const LINK_EXTERNAL = 0x10; |
Chris@0 | 21 |
Chris@0 | 22 /** |
Chris@0 | 23 * Specifies whether the field supports both internal and external URLs. |
Chris@0 | 24 */ |
Chris@0 | 25 const LINK_GENERIC = 0x11; |
Chris@0 | 26 |
Chris@0 | 27 /** |
Chris@0 | 28 * Determines if a link is external. |
Chris@0 | 29 * |
Chris@0 | 30 * @return bool |
Chris@0 | 31 * TRUE if the link is external, FALSE otherwise. |
Chris@0 | 32 */ |
Chris@0 | 33 public function isExternal(); |
Chris@0 | 34 |
Chris@0 | 35 /** |
Chris@0 | 36 * Gets the URL object. |
Chris@0 | 37 * |
Chris@0 | 38 * @return \Drupal\Core\Url |
Chris@0 | 39 * Returns a Url object. |
Chris@0 | 40 */ |
Chris@0 | 41 public function getUrl(); |
Chris@0 | 42 |
Chris@0 | 43 } |