Added route and controller for adding activity to case

This commit is contained in:
naomi
2018-04-14 14:40:37 +02:00
parent 7eb0ee092b
commit 0dec481020
4 changed files with 85 additions and 2 deletions

View File

@ -182,14 +182,14 @@ class Activity extends ContentEntityBase implements ActivityInterface {
// This field is always implied from the context,
// so has no form or view display.
$fields['case'] = BaseFieldDefinition::create('entity_reference')
$fields['case_entity'] = 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.'))
->setDescription(t('The name of the Activity.'))
->setSettings([
'max_length' => 50,
'text_processing' => 0,