Added notes field to cases
This commit is contained in:
parent
8cde0b8892
commit
de691b5a52
@ -57,3 +57,18 @@ function opencase_cases_update_8028() {
|
||||
\Drupal::entityDefinitionUpdateManager()
|
||||
->installFieldStorageDefinition('oc_fee_category', 'oc_case_fee', 'oc_case_fee', $storage_definition);
|
||||
}
|
||||
|
||||
function opencase_cases_update_8029() {
|
||||
$storage_definition = \Drupal\Core\Field\BaseFieldDefinition::create('string_long')
|
||||
->setRevisionable(TRUE)
|
||||
->setLabel(t('Notes'))
|
||||
->setSettings(array(
|
||||
'default_value' => '',
|
||||
'max_length' => 255,
|
||||
'text_processing' => 0,
|
||||
))
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
\Drupal::entityDefinitionUpdateManager()
|
||||
->installFieldStorageDefinition('notes', 'oc_case', 'oc_case', $storage_definition);
|
||||
}
|
||||
|
@ -295,6 +295,16 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
|
||||
->setRevisionable(TRUE)
|
||||
->setTranslatable(TRUE);
|
||||
|
||||
$fields['notes'] = BaseFieldDefinition::create('string_long')
|
||||
->setRevisionable(TRUE)
|
||||
->setLabel(t('Notes'))
|
||||
->setSettings(array(
|
||||
'default_value' => '',
|
||||
'max_length' => 255,
|
||||
'text_processing' => 0,
|
||||
))
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
return $fields;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user