我创建了一个以编程方式创建自定义用户字段的 drupal8 模块。它显示在管理字段部分,但不在管理表单显示和管理显示部分中启用/查看。
我试图覆盖 entiry_form_display 但没有成功。
core.entity_form_display.user.facebook.default.yml
langcode: en
status: true
dependencies:
config:
- field.field.user.user.field_facebook
module:
- field_layout
- layout_discovery
- user
id: user.field_facebook.default
targetEntityType: user
bundle: field_facebook
mode: default
content:
field_facebook:
type: string
weight: 200
label: above
settings:
link_to_entity: false
third_party_settings: { }
hidden: { }
field.field.user.user.field_facebook.yml
langcode: en
status: true
dependencies:
config:
- field.storage.user.field_facebook
module:
- user
id: user.user.field_facebook
field_name: field_facebook
entity_type: user
bundle: user
label: 'Facebook'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: string
field.storage.user.field_fullcontact_facebook.yml
langcode: en
status: true
dependencies:
module:
- user
id: user.field_facebook
field_name: field_facebook
entity_type: user
type: string
settings: {
max_length: 255
is_ascii: false
case_sensitive: false
}
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false