Made person's address fields form- and view-configurable, and bumped version
This commit is contained in:
parent
41505594be
commit
26d78a4f7f
@ -4,6 +4,20 @@
|
|||||||
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_80201() {
|
||||||
|
$update_manager = \Drupal::entityDefinitionUpdateManager();
|
||||||
|
$definition = $update_manager->getFieldStorageDefinition('phone', 'oc_actor');
|
||||||
|
$update_manager->updateFieldStorageDefinition($definition);
|
||||||
|
$definition = $update_manager->getFieldStorageDefinition('phone2', 'oc_actor');
|
||||||
|
$update_manager->updateFieldStorageDefinition($definition);
|
||||||
|
$definition = $update_manager->getFieldStorageDefinition('postal_address', 'oc_actor');
|
||||||
|
$update_manager->updateFieldStorageDefinition($definition);
|
||||||
|
$definition = $update_manager->getFieldStorageDefinition('email', 'oc_actor');
|
||||||
|
$update_manager->updateFieldStorageDefinition($definition);
|
||||||
|
$definition = $update_manager->getFieldStorageDefinition('post_code', 'oc_actor');
|
||||||
|
$update_manager->updateFieldStorageDefinition($definition);
|
||||||
|
}
|
||||||
|
|
||||||
function opencase_entities_update_80200() {
|
function opencase_entities_update_80200() {
|
||||||
$field_storage_definition = BaseFieldDefinition::create('string')
|
$field_storage_definition = BaseFieldDefinition::create('string')
|
||||||
->setLabel(t('Website'))
|
->setLabel(t('Website'))
|
||||||
|
@ -315,7 +315,8 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
|||||||
'max_length' => 30,
|
'max_length' => 30,
|
||||||
'text_processing' => 0,
|
'text_processing' => 0,
|
||||||
))
|
))
|
||||||
->setDisplayConfigurable('form', true)
|
->setDisplayConfigurable("form", true)
|
||||||
|
->setDisplayConfigurable("view", true)
|
||||||
->setDisplayOptions('view', array(
|
->setDisplayOptions('view', array(
|
||||||
'label' => 'above',
|
'label' => 'above',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
@ -333,6 +334,8 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
|||||||
'max_length' => 20,
|
'max_length' => 20,
|
||||||
'text_processing' => 0,
|
'text_processing' => 0,
|
||||||
))
|
))
|
||||||
|
->setDisplayConfigurable("form", true)
|
||||||
|
->setDisplayConfigurable("view", true)
|
||||||
->setDisplayOptions('view', array(
|
->setDisplayOptions('view', array(
|
||||||
'label' => 'above',
|
'label' => 'above',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
@ -350,6 +353,8 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
|||||||
'max_length' => 20,
|
'max_length' => 20,
|
||||||
'text_processing' => 0,
|
'text_processing' => 0,
|
||||||
))
|
))
|
||||||
|
->setDisplayConfigurable("form", true)
|
||||||
|
->setDisplayConfigurable("view", true)
|
||||||
->setDisplayOptions('view', array(
|
->setDisplayOptions('view', array(
|
||||||
'label' => 'above',
|
'label' => 'above',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
@ -368,6 +373,8 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
|||||||
'max_length' => 255,
|
'max_length' => 255,
|
||||||
'text_processing' => 0,
|
'text_processing' => 0,
|
||||||
))
|
))
|
||||||
|
->setDisplayConfigurable("form", true)
|
||||||
|
->setDisplayConfigurable("view", true)
|
||||||
->setDisplayOptions('view', array(
|
->setDisplayOptions('view', array(
|
||||||
'label' => 'above',
|
'label' => 'above',
|
||||||
'type' => 'basic_string',
|
'type' => 'basic_string',
|
||||||
@ -385,6 +392,8 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
|||||||
'max_length' => 10,
|
'max_length' => 10,
|
||||||
'text_processing' => 0,
|
'text_processing' => 0,
|
||||||
))
|
))
|
||||||
|
->setDisplayConfigurable("form", true)
|
||||||
|
->setDisplayConfigurable("view", true)
|
||||||
->setDisplayOptions('view', array(
|
->setDisplayOptions('view', array(
|
||||||
'label' => 'above',
|
'label' => 'above',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
|
@ -2,7 +2,7 @@ name: 'OpenCase'
|
|||||||
type: module
|
type: module
|
||||||
description: 'Simple Case Management'
|
description: 'Simple Case Management'
|
||||||
core: 8.x
|
core: 8.x
|
||||||
version: 8.x-2.0.0
|
version: 8.x-2.0.1
|
||||||
package: 'OpenCase'
|
package: 'OpenCase'
|
||||||
dependencies:
|
dependencies:
|
||||||
- opencase_entities
|
- opencase_entities
|
||||||
|
Reference in New Issue
Block a user