Added case field to activity

This commit is contained in:
naomi 2018-04-14 13:35:04 +02:00
parent 7c66cbd791
commit 7eb0ee092b

View File

@ -180,6 +180,13 @@ class Activity extends ContentEntityBase implements ActivityInterface {
# ->setDisplayConfigurable('view', TRUE);
->setTranslatable(TRUE);
// This field is always implied from the context,
// so has no form or view display.
$fields['case'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('Case'))
->setDescription(t('The case this activity belongs to.'))
->setSetting('target_type', 'case_entity');
$fields['name'] = BaseFieldDefinition::create('string')
->setLabel(t('Name'))
->setDescription(t('The name of the Activity entity.'))