Commit 127287ed authored by bojanz's avatar bojanz

Export the form display for the default product variation type, hide the author and created fields.

parent a4e25080
......@@ -14,6 +14,7 @@ config_devel:
- commerce_product.commerce_product_type.default
- commerce_product.commerce_product_variation_type.default
- core.entity_form_display.commerce_product.default.default
- core.entity_form_display.commerce_product_variation.default.default
- field.storage.commerce_product.body
- field.storage.commerce_product.variations
- field.field.commerce_product.default.body
......
langcode: en
status: true
dependencies:
config:
- commerce_product.commerce_product_variation_type.default
id: commerce_product_variation.default.default
targetEntityType: commerce_product_variation
bundle: default
mode: default
content:
sku:
type: string_textfield
weight: 0
settings:
size: 60
placeholder: ''
third_party_settings: { }
status:
type: boolean_checkbox
weight: 1
settings:
display_label: true
third_party_settings: { }
hidden:
created: true
uid: true
......@@ -152,21 +152,6 @@ class ProductVariation extends ContentEntityBase implements ProductVariationInte
->setSetting('handler', 'default')
->setDefaultValueCallback('Drupal\commerce_product\Entity\ProductVariation::getCurrentUserId')
->setTranslatable(TRUE)
->setDisplayOptions('view', [
'label' => 'hidden',
'type' => 'author',
'weight' => 0,
])
->setDisplayOptions('form', [
'type' => 'entity_reference_autocomplete',
'weight' => 5,
'settings' => [
'match_operator' => 'CONTAINS',
'size' => '60',
'autocomplete_type' => 'tags',
'placeholder' => '',
],
])
->setDisplayConfigurable('form', TRUE);
$fields['uuid'] = BaseFieldDefinition::create('uuid')
......@@ -200,7 +185,7 @@ class ProductVariation extends ContentEntityBase implements ProductVariationInte
$fields['status'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Active'))
->setDescription(t('Disabled product variations cannot be added to shopping carts and may be hidden in product views.'))
->setDescription(t('Disabled product variations cannot be added to shopping carts.'))
->setDefaultValue(TRUE)
->setTranslatable(TRUE)
->setSettings([
......@@ -219,15 +204,6 @@ class ProductVariation extends ContentEntityBase implements ProductVariationInte
->setLabel(t('Created'))
->setDescription(t('The time that the product variation was created.'))
->setTranslatable(TRUE)
->setDisplayOptions('view', [
'label' => 'hidden',
'type' => 'timestamp',
'weight' => 0,
])
->setDisplayOptions('form', [
'type' => 'datetime_timestamp',
'weight' => 10,
])
->setDisplayConfigurable('form', TRUE);
$fields['changed'] = BaseFieldDefinition::create('changed')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment