uc_attribute_field.yml in Commerce Migrate 3.1.x
Same filename and directory in other branches
modules/ubercart/migrations/uc_attribute_field.yml
File
modules/ubercart/migrations/uc_attribute_field.ymlView source
- id: uc_attribute_field
- label: Ubercart attribute field storage
- migration_tags:
- - Drupal 6
- - Drupal 7
- - Ubercart
- - Configuration
- source:
- plugin: uc_attribute
- constants:
- langcode: en
- entity_type: commerce_product_variation
- field_name_prefix: attribute
- target_type: commerce_product_attribute_value
- type: entity_reference
- process:
- aid: aid
- entity_type: 'constants/entity_type'
- langcode: 'constants/langcode'
- field_machine_name:
- -
- plugin: machine_name
- source: name
- -
- plugin: substr
- length: 20
- -
- plugin: make_unique_entity_field
- entity_type: field_storage_config
- field: field_machine_name
- field_name:
- plugin: concat
- source:
- - 'constants/field_name_prefix'
- - '@field_machine_name'
- delimiter: _
- type: 'constants/type'
- settings/target_type: 'constants/target_type'
- # Set the cardinality from the 4 display types
- # used in module uc_attribute.
- # @link http://cgit.drupalcode.org/ubercart/tree/uc_attribute/uc_attribute.module?h=6.x-2.x#n1378 @endlink
- # @link http://cgit.drupalcode.org/ubercart/tree/uc_attribute/uc_attribute.module?h=7.x-3.x#n1465 @endlink
- cardinality:
- plugin: static_map
- bypass: true
- source: display
- map:
- # Text field
- 0: 1
- # Select box
- 1: 1
- # Radio buttons
- 2: 1
- # Checkboxes
- 3: -1
- destination:
- plugin: entity:field_storage_config
- destination_module: field