Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes
This commit is contained in:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
@ -26,8 +26,14 @@ $connection->insert('config')
|
|||
])
|
||||
->execute();
|
||||
|
||||
// Configuration for an entity_reference field storage.
|
||||
$config = Yaml::decode(file_get_contents(__DIR__ . '/field.storage.node.field_ref_views_select_2429191.yml'));
|
||||
// Configuration for an entity_reference field storage using the View for
|
||||
// selection.
|
||||
$field_ref_views_select_2429191 = Yaml::decode(file_get_contents(__DIR__ . '/field.storage.node.field_ref_views_select_2429191.yml'));
|
||||
|
||||
// Configuration for an entity_reference field storage using the auto-create
|
||||
// feature.
|
||||
$field_ref_autocreate_2412569 = Yaml::decode(file_get_contents(__DIR__ . '/field.storage.node.field_ref_autocreate_2412569.yml'));
|
||||
|
||||
$connection->insert('config')
|
||||
->fields([
|
||||
'collection',
|
||||
|
@ -36,8 +42,13 @@ $connection->insert('config')
|
|||
])
|
||||
->values([
|
||||
'collection' => '',
|
||||
'name' => 'field.storage.' . $config['id'],
|
||||
'data' => serialize($config),
|
||||
'name' => 'field.storage.' . $field_ref_views_select_2429191['id'],
|
||||
'data' => serialize($field_ref_views_select_2429191),
|
||||
])
|
||||
->values([
|
||||
'collection' => '',
|
||||
'name' => 'field.storage.' . $field_ref_autocreate_2412569['id'],
|
||||
'data' => serialize($field_ref_autocreate_2412569),
|
||||
])
|
||||
->execute();
|
||||
// We need to Update the registry of "last installed" field definitions.
|
||||
|
@ -48,7 +59,8 @@ $installed = $connection->select('key_value')
|
|||
->execute()
|
||||
->fetchField();
|
||||
$installed = unserialize($installed);
|
||||
$installed['field_ref_views_select_2429191'] = new \Drupal\field\Entity\FieldStorageConfig($config);
|
||||
$installed['field_ref_views_select_2429191'] = new \Drupal\field\Entity\FieldStorageConfig($field_ref_views_select_2429191);
|
||||
$installed['field_ref_autocreate_2412569'] = new \Drupal\field\Entity\FieldStorageConfig($field_ref_autocreate_2412569);
|
||||
$connection->update('key_value')
|
||||
->condition('collection', 'entity.definitions.installed')
|
||||
->condition('name', 'node.field_storage_definitions')
|
||||
|
@ -58,7 +70,11 @@ $connection->update('key_value')
|
|||
->execute();
|
||||
|
||||
// Configuration for an entity_reference field using the View for selection.
|
||||
$config = Yaml::decode(file_get_contents(__DIR__ . '/field.field.node.article.field_ref_views_select_2429191.yml'));
|
||||
$field_ref_views_select_2429191 = Yaml::decode(file_get_contents(__DIR__ . '/field.field.node.article.field_ref_views_select_2429191.yml'));
|
||||
|
||||
// Configuration for an entity_reference field using the auto-create feature.
|
||||
$field_ref_autocreate_2412569 = Yaml::decode(file_get_contents(__DIR__ . '/field.field.node.article.field_ref_autocreate_2412569.yml'));
|
||||
|
||||
$connection->insert('config')
|
||||
->fields([
|
||||
'collection',
|
||||
|
@ -67,7 +83,12 @@ $connection->insert('config')
|
|||
])
|
||||
->values([
|
||||
'collection' => '',
|
||||
'name' => 'field.field.' . $config['id'],
|
||||
'data' => serialize($config),
|
||||
'name' => 'field.field.' . $field_ref_views_select_2429191['id'],
|
||||
'data' => serialize($field_ref_views_select_2429191),
|
||||
])
|
||||
->values([
|
||||
'collection' => '',
|
||||
'name' => 'field.field.' . $field_ref_autocreate_2412569['id'],
|
||||
'data' => serialize($field_ref_autocreate_2412569),
|
||||
])
|
||||
->execute();
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
uuid: d6deba8d-073a-4572-a000-ee2a2de94de2
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.node.field_ref_autocreate_2412569
|
||||
- node.type.article
|
||||
- taxonomy.vocabulary.tags
|
||||
- taxonomy.vocabulary.test
|
||||
id: node.article.field_ref_autocreate_2412569
|
||||
field_name: field_ref_autocreate_2412569
|
||||
entity_type: node
|
||||
bundle: article
|
||||
label: 'Ref Autocreate 2412569'
|
||||
description: ''
|
||||
required: false
|
||||
translatable: false
|
||||
default_value: { }
|
||||
default_value_callback: ''
|
||||
settings:
|
||||
handler: 'default:taxonomy_term'
|
||||
handler_settings:
|
||||
target_bundles:
|
||||
tags: tags
|
||||
test: test
|
||||
sort:
|
||||
field: _none
|
||||
auto_create: true
|
||||
field_type: entity_reference
|
20
core/modules/field/tests/fixtures/update/field.storage.node.field_ref_autocreate_2412569.yml
vendored
Normal file
20
core/modules/field/tests/fixtures/update/field.storage.node.field_ref_autocreate_2412569.yml
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
uuid: 5e4095a3-8f89-4d7a-b222-34bf5240b646
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- node
|
||||
- taxonomy
|
||||
id: node.field_ref_autocreate_2412569
|
||||
field_name: field_ref_autocreate_2412569
|
||||
entity_type: node
|
||||
type: entity_reference
|
||||
settings:
|
||||
target_type: taxonomy_term
|
||||
module: core
|
||||
locked: false
|
||||
cardinality: 1
|
||||
translatable: true
|
||||
indexes: { }
|
||||
persist_with_no_fields: false
|
||||
custom_storage: false
|
Reference in a new issue