Added website field to org, and bumped version (to 2.0.0 because ran out of numbers)

This commit is contained in:
2021-06-15 20:13:42 +02:00
parent 3f3945f9a0
commit 41505594be
3 changed files with 43 additions and 1 deletions

View File

@ -211,6 +211,24 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
'type' => 'string_textarea',
'weight' => 50,
));
$fields['website'] = BaseFieldDefinition::create('string')
->setLabel(t('Website'))
->setRevisionable(TRUE)
->setSettings([
'max_length' => 50,
'text_processing' => 0,
])
->setDefaultValue('')
->setDisplayOptions('view', [
'label' => 'above',
'type' => 'string',
'weight' => 49,
])
->setDisplayOptions('form', [
'type' => 'string_textfield',
'weight' => 49,
])
->setRequired(FALSE);
$fields['contact_name'] = BaseFieldDefinition::create('string')
->setLabel(t('Contact Name'))
->setDescription(t('Name of the main contact for this organisation.'))