public function LinkItem::getPropertyDefinitions

Implements ComplexDataInterface::getPropertyDefinitions().

Overrides Map::getPropertyDefinitions

File

drupal/core/modules/link/lib/Drupal/link/Type/LinkItem.php, line 29
Contains \Drupal\link\Type\LinkItem.

Class

LinkItem
Defines the 'link_field' entity field item.

Namespace

Drupal\link\Type

Code

public function getPropertyDefinitions() {
  if (!isset(self::$propertyDefinitions)) {
    self::$propertyDefinitions['url'] = array(
      'type' => 'uri',
      'label' => t('URL'),
    );
    self::$propertyDefinitions['title'] = array(
      'type' => 'string',
      'label' => t('Link text'),
    );
    self::$propertyDefinitions['attributes'] = array(
      'type' => 'map',
      'label' => t('Attributes'),
    );
  }
  return self::$propertyDefinitions;
}