Implements \Drupal\Core\TypedData\ComplexDataInterface::getPropertyDefinitions().
Overrides Map::getPropertyDefinitions
public function getPropertyDefinitions() {
if (!isset(static::$propertyDefinitions)) {
static::$propertyDefinitions['tid'] = array(
'type' => 'integer',
'label' => t('Referenced taxonomy term id.'),
);
static::$propertyDefinitions['entity'] = array(
'type' => 'entity',
'constraints' => array(
'EntityType' => 'taxonomy_term',
),
'label' => t('Term'),
'description' => t('The referenced taxonomy term'),
// The entity object is computed out of the tid.
'computed' => TRUE,
'read-only' => FALSE,
'settings' => array(
'id source' => 'tid',
),
);
}
return static::$propertyDefinitions;
}