Added actors field to case & and case to activity
This commit is contained in:
parent
9d8c6a34d9
commit
fc982f8376
@ -250,6 +250,25 @@ class OCActivity extends RevisionableContentEntityBase implements OCActivityInte
|
|||||||
->setDisplayConfigurable('view', TRUE)
|
->setDisplayConfigurable('view', TRUE)
|
||||||
->setRequired(TRUE);
|
->setRequired(TRUE);
|
||||||
|
|
||||||
|
$fields['oc_case'] = BaseFieldDefinition::create('entity_reference')
|
||||||
|
->setLabel(t('Case'))
|
||||||
|
->setDescription(t('The case this activity belongs to.'))
|
||||||
|
->setSetting('target_type', 'oc_case')
|
||||||
|
->setSetting('handler', 'default')
|
||||||
|
->setTranslatable(TRUE)
|
||||||
|
->setCardinality(1)
|
||||||
|
->setDisplayOptions('form', [
|
||||||
|
'type' => 'entity_reference_autocomplete',
|
||||||
|
'weight' => 5,
|
||||||
|
'settings' => [
|
||||||
|
'match_operator' => 'CONTAINS',
|
||||||
|
'size' => '60',
|
||||||
|
'autocomplete_type' => 'tags',
|
||||||
|
'placeholder' => '',
|
||||||
|
],
|
||||||
|
])
|
||||||
|
->setRequired(TRUE);
|
||||||
|
|
||||||
$fields['status'] = BaseFieldDefinition::create('boolean')
|
$fields['status'] = BaseFieldDefinition::create('boolean')
|
||||||
->setLabel(t('Publishing status'))
|
->setLabel(t('Publishing status'))
|
||||||
->setDescription(t('A boolean indicating whether the Activity is published.'))
|
->setDescription(t('A boolean indicating whether the Activity is published.'))
|
||||||
|
@ -250,6 +250,25 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
|
|||||||
->setDisplayConfigurable('view', TRUE)
|
->setDisplayConfigurable('view', TRUE)
|
||||||
->setRequired(TRUE);
|
->setRequired(TRUE);
|
||||||
|
|
||||||
|
$fields['actors_involved'] = BaseFieldDefinition::create('entity_reference')
|
||||||
|
->setLabel(t('Involved Parties'))
|
||||||
|
->setDescription(t('People involved in this case, in their various capacities'))
|
||||||
|
->setSetting('target_type', 'oc_actor')
|
||||||
|
->setSetting('handler', 'default')
|
||||||
|
->setTranslatable(TRUE)
|
||||||
|
->setCardinality(-1)
|
||||||
|
->setDisplayOptions('form', [
|
||||||
|
'type' => 'entity_reference_autocomplete',
|
||||||
|
'weight' => 5,
|
||||||
|
'settings' => [
|
||||||
|
'match_operator' => 'CONTAINS',
|
||||||
|
'size' => '60',
|
||||||
|
'autocomplete_type' => 'tags',
|
||||||
|
'placeholder' => '',
|
||||||
|
],
|
||||||
|
])
|
||||||
|
->setRequired(TRUE);
|
||||||
|
|
||||||
$fields['status'] = BaseFieldDefinition::create('boolean')
|
$fields['status'] = BaseFieldDefinition::create('boolean')
|
||||||
->setLabel(t('Publishing status'))
|
->setLabel(t('Publishing status'))
|
||||||
->setDescription(t('A boolean indicating whether the Case is published.'))
|
->setDescription(t('A boolean indicating whether the Case is published.'))
|
||||||
|
Reference in New Issue
Block a user