Deleted old website field
This commit is contained in:
parent
bca978f6f0
commit
5e0bde90a0
@ -4,6 +4,11 @@
|
|||||||
use \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchemaConverter;
|
use \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchemaConverter;
|
||||||
use \Drupal\Core\Field\BaseFieldDefinition;
|
use \Drupal\Core\Field\BaseFieldDefinition;
|
||||||
|
|
||||||
|
function opencase_entities_update_90004() {
|
||||||
|
$update_manager = \Drupal::entityDefinitionUpdateManager();
|
||||||
|
$definition = $update_manager->getFieldStorageDefinition('website', 'oc_organisation');
|
||||||
|
$update_manager->uninstallFieldStorageDefinition($definition);
|
||||||
|
}
|
||||||
|
|
||||||
function opencase_entities_update_90003() {
|
function opencase_entities_update_90003() {
|
||||||
$field_storage_definition = BaseFieldDefinition::create('link')
|
$field_storage_definition = BaseFieldDefinition::create('link')
|
||||||
|
@ -211,23 +211,11 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
|
|||||||
'max_length' => 255,
|
'max_length' => 255,
|
||||||
'text_processing' => 0,
|
'text_processing' => 0,
|
||||||
));
|
));
|
||||||
$fields['website'] = BaseFieldDefinition::create('string')
|
|
||||||
->setLabel(t('Website'))
|
|
||||||
->setRevisionable(TRUE)
|
|
||||||
->setSettings([
|
|
||||||
'max_length' => 50,
|
|
||||||
'text_processing' => 0,
|
|
||||||
])
|
|
||||||
->setDefaultValue('')
|
|
||||||
->setDisplayConfigurable('form', true)
|
|
||||||
->setDisplayConfigurable('view', true)
|
|
||||||
->setRequired(FALSE);
|
|
||||||
|
|
||||||
$fields['org_website'] = BaseFieldDefinition::create('link')
|
$fields['org_website'] = BaseFieldDefinition::create('link')
|
||||||
->setLabel(t('Website'))
|
->setLabel(t('Website'))
|
||||||
->setRevisionable(TRUE)
|
->setRevisionable(TRUE)
|
||||||
->setSettings([
|
->setSettings([
|
||||||
'max_length' => 50,
|
|
||||||
'text_processing' => 0,
|
'text_processing' => 0,
|
||||||
'title' => 0,
|
'title' => 0,
|
||||||
'link_type' => 16
|
'link_type' => 16
|
||||||
|
Reference in New Issue
Block a user