Added description field to event

This commit is contained in:
naomi 2021-01-28 11:54:07 +00:00
parent b48ba012cb
commit 517938ab7b
2 changed files with 21 additions and 1 deletions

View File

@ -153,6 +153,26 @@ class OCEvent extends ContentEntityBase implements OCEventInterface {
'weight' => -3,
]);
$fields['description'] = BaseFieldDefinition::create('string_long')
->setLabel(t('Description'))
->setRevisionable(TRUE)
->setSettings([
'max_length' => 50,
'text_processing' => 0,
])
->setDefaultValue('')
->setDisplayOptions('view', [
'label' => 'above',
'type' => 'basic_string',
'weight' => -1,
])
->setDisplayOptions('form', [
'type' => 'string_textarea',
'weight' => -1,
])
->setRequired(FALSE);
return $fields;
}

View File

@ -88,7 +88,7 @@ function opencase_uninstall() {
$configs = [
'block.block.opencase',
'system.menu.opencase',
'views.view.contact_details_changes'
'views.view.contact_details_changes',
];
foreach($configs as $config) {
Drupal::configFactory()->getEditable($config)->delete();