Added base field "contact role" to organisation, and bumped version
This commit is contained in:
@ -2,6 +2,31 @@
|
||||
|
||||
|
||||
use \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchemaConverter;
|
||||
use \Drupal\Core\Field\BaseFieldDefinition;
|
||||
|
||||
function opencase_entities_update_80199() {
|
||||
$field_storage_definition = BaseFieldDefinition::create('string')
|
||||
->setLabel(t('Contact Role'))
|
||||
->setDescription(t('Role of the contact within the organisation'))
|
||||
->setRevisionable(TRUE)
|
||||
->setSettings([
|
||||
'max_length' => 50,
|
||||
'text_processing' => 0,
|
||||
])
|
||||
->setDefaultValue('')
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => 52,
|
||||
])
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'string_textfield',
|
||||
'weight' => 52,
|
||||
])
|
||||
->setRequired(FALSE);
|
||||
\Drupal::entityDefinitionUpdateManager()
|
||||
->installFieldStorageDefinition('contact_role', 'oc_organisation', 'opencase_entities', $field_storage_definition);
|
||||
}
|
||||
|
||||
function opencase_entities_update_80198() {
|
||||
$field_storage_definition = \Drupal\Core\Field\BaseFieldDefinition::create('file')
|
||||
|
Reference in New Issue
Block a user