Added new website field (org_website) - link field

This commit is contained in:
2022-06-20 13:31:21 +01:00
parent 49bf43e5b4
commit bca978f6f0
3 changed files with 35 additions and 1 deletions

View File

@ -222,6 +222,21 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
->setDisplayConfigurable('form', true)
->setDisplayConfigurable('view', true)
->setRequired(FALSE);
$fields['org_website'] = BaseFieldDefinition::create('link')
->setLabel(t('Website'))
->setRevisionable(TRUE)
->setSettings([
'max_length' => 50,
'text_processing' => 0,
'title' => 0,
'link_type' => 16
])
->setDefaultValue('')
->setDisplayConfigurable('form', true)
->setDisplayConfigurable('view', true)
->setRequired(FALSE);
$fields['contact_name'] = BaseFieldDefinition::create('string')
->setLabel(t('Contact Name'))
->setDescription(t('Name of the main contact for this organisation.'))