Added description field to event

This commit is contained in:
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;
}