From 5cd4e89a7d58ae96e60bbafd9d2211c386c584ce Mon Sep 17 00:00:00 2001 From: bach Date: Tue, 5 Nov 2024 16:37:58 +0100 Subject: [PATCH] views + REST partenaires (/rest/partenaires) --- ...y_view_display.node.partenaire.default.yml | 35 ++- ...tity_view_display.node.partenaire.full.yml | 64 +++++ config/sync/views.view.partenaires.yml | 232 ++++++++++++++++++ 3 files changed, 311 insertions(+), 20 deletions(-) create mode 100644 config/sync/core.entity_view_display.node.partenaire.full.yml create mode 100644 config/sync/views.view.partenaires.yml diff --git a/config/sync/core.entity_view_display.node.partenaire.default.yml b/config/sync/core.entity_view_display.node.partenaire.default.yml index ac0240c..028999c 100644 --- a/config/sync/core.entity_view_display.node.partenaire.default.yml +++ b/config/sync/core.entity_view_display.node.partenaire.default.yml @@ -11,6 +11,7 @@ dependencies: module: - image - link + - linked_field - text - user id: node.partenaire.default @@ -23,11 +24,11 @@ content: label: hidden settings: { } third_party_settings: { } - weight: 101 + weight: 1 region: content field_lien: type: link - label: above + label: visually_hidden settings: trim_length: 80 url_only: false @@ -35,34 +36,28 @@ content: rel: '' target: '' third_party_settings: { } - weight: 102 + weight: 2 region: content field_logo: type: image - label: above + label: visually_hidden settings: image_link: '' image_style: '' image_loading: attribute: lazy - third_party_settings: { } - weight: 103 - region: content - field_poid: - type: number_integer - label: above - settings: - thousand_separator: '' - prefix_suffix: true - third_party_settings: { } - weight: 104 - region: content - links: - settings: { } - third_party_settings: { } - weight: 100 + third_party_settings: + linked_field: + linked: '1' + type: field + destination: field_lien + advanced: { } + token: '' + weight: 0 region: content hidden: + field_poid: true footnotes_group: true langcode: true + links: true search_api_excerpt: true diff --git a/config/sync/core.entity_view_display.node.partenaire.full.yml b/config/sync/core.entity_view_display.node.partenaire.full.yml new file mode 100644 index 0000000..4306126 --- /dev/null +++ b/config/sync/core.entity_view_display.node.partenaire.full.yml @@ -0,0 +1,64 @@ +uuid: 68558a6e-25c9-4b01-a35c-619960239dfc +langcode: fr +status: true +dependencies: + config: + - core.entity_view_mode.node.full + - field.field.node.partenaire.body + - field.field.node.partenaire.field_lien + - field.field.node.partenaire.field_logo + - field.field.node.partenaire.field_poid + - node.type.partenaire + module: + - image + - link + - linked_field + - text + - user +id: node.partenaire.full +targetEntityType: node +bundle: partenaire +mode: full +content: + body: + type: text_default + label: hidden + settings: { } + third_party_settings: { } + weight: 1 + region: content + field_lien: + type: link + label: visually_hidden + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + weight: 2 + region: content + field_logo: + type: image + label: visually_hidden + settings: + image_link: '' + image_style: '' + image_loading: + attribute: lazy + third_party_settings: + linked_field: + linked: '1' + type: field + destination: field_lien + advanced: { } + token: '' + weight: 0 + region: content +hidden: + field_poid: true + footnotes_group: true + langcode: true + links: true + search_api_excerpt: true diff --git a/config/sync/views.view.partenaires.yml b/config/sync/views.view.partenaires.yml new file mode 100644 index 0000000..aa54627 --- /dev/null +++ b/config/sync/views.view.partenaires.yml @@ -0,0 +1,232 @@ +uuid: 2432455e-2f0c-42de-a325-d2eeaca94473 +langcode: fr +status: true +dependencies: + config: + - core.entity_view_mode.node.full + - node.type.partenaire + - system.menu.main + module: + - node + - rest + - serialization + - user +id: partenaires +label: partenaires +module: views +description: '' +tag: '' +base_table: node_field_data +base_field: nid +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + title: partenaires + fields: + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: title + plugin_id: field + label: '' + exclude: false + alter: + alter_text: false + make_link: false + absolute: false + word_boundary: false + ellipsis: false + strip_tags: false + trim: false + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + pager: + type: none + options: + offset: 0 + items_per_page: 0 + exposed_form: + type: basic + options: + submit_button: Appliquer + reset_button: false + reset_button_label: RĂ©initialiser + exposed_sorts_label: 'Trier par' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + access: + type: perm + options: + perm: 'access content' + cache: + type: tag + options: { } + empty: { } + sorts: + field_poid_value: + id: field_poid_value + table: node__field_poid + field: field_poid_value + relationship: none + group_type: group + admin_label: '' + plugin_id: standard + order: ASC + expose: + label: '' + field_identifier: '' + exposed: false + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: title + plugin_id: standard + order: ASC + expose: + label: '' + field_identifier: '' + exposed: false + arguments: { } + filters: + status: + id: status + table: node_field_data + field: status + entity_type: node + entity_field: status + plugin_id: boolean + value: '1' + group: 1 + expose: + operator: '' + type: + id: type + table: node_field_data + field: type + entity_type: node + entity_field: type + plugin_id: bundle + value: + partenaire: partenaire + style: + type: default + row: + type: 'entity:node' + options: + relationship: none + view_mode: full + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: false + replica: false + query_tags: { } + relationships: { } + header: { } + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - 'user.node_grants:view' + - user.permissions + tags: { } + page_1: + id: page_1 + display_title: Page + display_plugin: page + position: 1 + display_options: + display_extenders: { } + path: partenaires + menu: + type: normal + title: 'Les partenaires' + description: '' + weight: 4 + expanded: false + menu_name: main + parent: '' + context: '0' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - 'user.node_grants:view' + - user.permissions + tags: { } + rest_export_1: + id: rest_export_1 + display_title: 'REST export' + display_plugin: rest_export + position: 2 + display_options: + pager: + type: some + options: + offset: 0 + items_per_page: 10 + style: + type: serializer + row: + type: data_entity + options: { } + defaults: + style: false + row: false + display_extenders: { } + path: rest/partenaires + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - request_format + - 'user.node_grants:view' + - user.permissions + tags: { }