From ef04575880f6d5f475eb669d870887ce533a7ecf Mon Sep 17 00:00:00 2001 From: Lio Novelli Date: Wed, 26 Apr 2023 21:47:08 +0200 Subject: [PATCH] Add related concept field. --- ...tity_form_display.node.concept.default.yml | 22 ++++++++++++++ ...tity_view_display.node.concept.default.yml | 18 ++++++++++++ ...ntity_view_display.node.concept.teaser.yml | 4 +++ ...eld.node.concept.field_related_concept.yml | 28 ++++++++++++++++++ .../field.field.node.concept.field_tags.yml | 29 +++++++++++++++++++ ...eld.storage.node.field_related_concept.yml | 19 ++++++++++++ config/sync/node.settings.yml | 2 +- 7 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 config/sync/field.field.node.concept.field_related_concept.yml create mode 100644 config/sync/field.field.node.concept.field_tags.yml create mode 100644 config/sync/field.storage.node.field_related_concept.yml diff --git a/config/sync/core.entity_form_display.node.concept.default.yml b/config/sync/core.entity_form_display.node.concept.default.yml index a54274a..ddc33ca 100644 --- a/config/sync/core.entity_form_display.node.concept.default.yml +++ b/config/sync/core.entity_form_display.node.concept.default.yml @@ -5,6 +5,8 @@ dependencies: config: - field.field.node.concept.body - field.field.node.concept.field_media + - field.field.node.concept.field_related_concept + - field.field.node.concept.field_tags - node.type.concept module: - media_library @@ -38,6 +40,26 @@ content: settings: media_types: { } third_party_settings: { } + field_related_concept: + type: entity_reference_autocomplete + weight: 123 + region: content + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } + field_tags: + type: entity_reference_autocomplete + weight: 124 + region: content + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } langcode: type: language_select weight: 2 diff --git a/config/sync/core.entity_view_display.node.concept.default.yml b/config/sync/core.entity_view_display.node.concept.default.yml index 5e93c2a..0f4609d 100644 --- a/config/sync/core.entity_view_display.node.concept.default.yml +++ b/config/sync/core.entity_view_display.node.concept.default.yml @@ -5,6 +5,8 @@ dependencies: config: - field.field.node.concept.body - field.field.node.concept.field_media + - field.field.node.concept.field_related_concept + - field.field.node.concept.field_tags - node.type.concept module: - text @@ -30,6 +32,22 @@ content: third_party_settings: { } weight: 102 region: content + field_related_concept: + type: entity_reference_label + label: above + settings: + link: true + third_party_settings: { } + weight: 103 + region: content + field_tags: + type: entity_reference_label + label: above + settings: + link: true + third_party_settings: { } + weight: 104 + region: content links: settings: { } third_party_settings: { } diff --git a/config/sync/core.entity_view_display.node.concept.teaser.yml b/config/sync/core.entity_view_display.node.concept.teaser.yml index e1ebdb1..5cf4b85 100644 --- a/config/sync/core.entity_view_display.node.concept.teaser.yml +++ b/config/sync/core.entity_view_display.node.concept.teaser.yml @@ -6,6 +6,8 @@ dependencies: - core.entity_view_mode.node.teaser - field.field.node.concept.body - field.field.node.concept.field_media + - field.field.node.concept.field_related_concept + - field.field.node.concept.field_tags - node.type.concept module: - text @@ -30,4 +32,6 @@ content: region: content hidden: field_media: true + field_related_concept: true + field_tags: true langcode: true diff --git a/config/sync/field.field.node.concept.field_related_concept.yml b/config/sync/field.field.node.concept.field_related_concept.yml new file mode 100644 index 0000000..680a6fa --- /dev/null +++ b/config/sync/field.field.node.concept.field_related_concept.yml @@ -0,0 +1,28 @@ +uuid: 0d779f9d-fce8-4b5c-a29c-9cebea2af92f +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_related_concept + - node.type.concept +id: node.concept.field_related_concept +field_name: field_related_concept +entity_type: node +bundle: concept +label: 'Related concept' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:node' + handler_settings: + target_bundles: + concept: concept + sort: + field: _none + direction: ASC + auto_create: true + auto_create_bundle: '' +field_type: entity_reference diff --git a/config/sync/field.field.node.concept.field_tags.yml b/config/sync/field.field.node.concept.field_tags.yml new file mode 100644 index 0000000..fd9b0b9 --- /dev/null +++ b/config/sync/field.field.node.concept.field_tags.yml @@ -0,0 +1,29 @@ +uuid: f5fade64-73dc-420b-8c1f-ab4fe3355a52 +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_tags + - node.type.concept + - taxonomy.vocabulary.tags +id: node.concept.field_tags +field_name: field_tags +entity_type: node +bundle: concept +label: Tags +description: '' +required: false +translatable: true +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + tags: tags + sort: + field: name + direction: asc + auto_create: true + auto_create_bundle: '' +field_type: entity_reference diff --git a/config/sync/field.storage.node.field_related_concept.yml b/config/sync/field.storage.node.field_related_concept.yml new file mode 100644 index 0000000..9ea22bd --- /dev/null +++ b/config/sync/field.storage.node.field_related_concept.yml @@ -0,0 +1,19 @@ +uuid: b8ef611d-a485-416c-a944-7c971db3715a +langcode: en +status: true +dependencies: + module: + - node +id: node.field_related_concept +field_name: field_related_concept +entity_type: node +type: entity_reference +settings: + target_type: node +module: core +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/node.settings.yml b/config/sync/node.settings.yml index 3a9d97e..6fcede9 100644 --- a/config/sync/node.settings.yml +++ b/config/sync/node.settings.yml @@ -1,3 +1,3 @@ _core: default_config_hash: 2OMXCScXUOLSYID9-phjO4q36nnnaMWNUlDxEqZzG1U -use_admin_theme: false +use_admin_theme: true -- 2.30.2