Implements \Drupal\Core\TypedData\ComplexDataInterface::getPropertyDefinitions().
Overrides ComplexDataInterface::getPropertyDefinitions
public function getPropertyDefinitions() {
if (!isset(self::$propertyDefinitions)) {
self::$propertyDefinitions['tid'] = array(
'type' => 'integer',
'label' => t('Referenced taxonomy term id.'),
);
self::$propertyDefinitions['entity'] = array(
'type' => 'entity',
'constraints' => array(
'entity type' => '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 self::$propertyDefinitions;
}