Added website field to org, and bumped version (to 2.0.0 because ran out of numbers)
This commit is contained in:
parent
3f3945f9a0
commit
41505594be
@ -4,6 +4,30 @@
|
||||
use \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchemaConverter;
|
||||
use \Drupal\Core\Field\BaseFieldDefinition;
|
||||
|
||||
function opencase_entities_update_80200() {
|
||||
$field_storage_definition = 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);
|
||||
|
||||
\Drupal::entityDefinitionUpdateManager()
|
||||
->installFieldStorageDefinition('org_website', 'oc_organisation', 'opencase_entities', $field_storage_definition);
|
||||
}
|
||||
|
||||
function opencase_entities_update_80199() {
|
||||
$field_storage_definition = BaseFieldDefinition::create('string')
|
||||
->setLabel(t('Contact Role'))
|
||||
|
@ -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.'))
|
||||
|
@ -2,7 +2,7 @@ name: 'OpenCase'
|
||||
type: module
|
||||
description: 'Simple Case Management'
|
||||
core: 8.x
|
||||
version: 8.x-1.9.9
|
||||
version: 8.x-2.0.0
|
||||
package: 'OpenCase'
|
||||
dependencies:
|
||||
- opencase_entities
|
||||
|
Reference in New Issue
Block a user