Merge branch 'master' of figureslibres.io:bachir/popsu-d9

This commit is contained in:
armansansd 2021-08-17 12:35:09 +02:00
commit 446490ca3f
16 changed files with 1032 additions and 209 deletions

View File

@ -97,6 +97,8 @@ content:
settings: { } settings: { }
third_party_settings: { } third_party_settings: { }
hidden: hidden:
computed_projets_reference: true
computed_themes_reference: true
field_actif: true field_actif: true
field_poid: true field_poid: true
langcode: true langcode: true

View File

@ -8,44 +8,20 @@ dependencies:
- field.field.paragraph.textes.field_texte - field.field.paragraph.textes.field_texte
- field.field.paragraph.textes.field_titre - field.field.paragraph.textes.field_titre
- paragraphs.paragraphs_type.textes - paragraphs.paragraphs_type.textes
module:
- advanced_text_formatter
id: paragraph.textes.preview id: paragraph.textes.preview
targetEntityType: paragraph targetEntityType: paragraph
bundle: textes bundle: textes
mode: preview mode: preview
content: content:
field_texte: field_titre:
type: string
weight: 0 weight: 0
label: hidden
settings:
trim_length: '600'
ellipsis: '1'
word_boundary: '1'
use_summary: '1'
filter: input
format: plain_text
allowed_html:
- a
- b
- br
- dd
- dl
- dt
- em
- i
- li
- ol
- p
- strong
- u
- ul
token_replace: 0
autop: 0
third_party_settings: { }
type: advanced_text
region: content region: content
label: visually_hidden
settings:
link_to_entity: false
third_party_settings: { }
hidden: hidden:
field_photo: true field_photo: true
field_titre: true field_texte: true
search_api_excerpt: true search_api_excerpt: true

View File

@ -112,6 +112,7 @@ module:
persistent_login: 0 persistent_login: 0
popsu_link_block: 0 popsu_link_block: 0
popsu_migrate: 0 popsu_migrate: 0
popsu_programme: 0
redirect: 0 redirect: 0
redis: 0 redis: 0
responsive_image: 0 responsive_image: 0

View File

@ -4,10 +4,12 @@ status: true
dependencies: dependencies:
config: config:
- page_manager.page.node - page_manager.page.node
- views.view.static
module: module:
- ctools - ctools
- ctools_block - ctools_block
- panels - panels
- views
id: node-panels_variant-1 id: node-panels_variant-1
label: Static label: Static
variant: panels_variant variant: panels_variant
@ -80,6 +82,17 @@ variant_settings:
uuid: 1a8fe5ae-455a-4235-8568-487d91f75cf8 uuid: 1a8fe5ae-455a-4235-8568-487d91f75cf8
context_mapping: context_mapping:
entity: node entity: node
8b03ade6-e854-4bb0-8a9b-34722a2854a3:
id: 'views_block:static-block_1'
label: ''
provider: views
label_display: '0'
views_label: ''
items_per_page: none
region: first
weight: 0
uuid: 8b03ade6-e854-4bb0-8a9b-34722a2854a3
context_mapping: { }
id: panels_variant id: panels_variant
uuid: 0270b847-8f4c-4875-9783-3fcc27841d13 uuid: 0270b847-8f4c-4875-9783-3fcc27841d13
label: null label: null

View File

@ -44,7 +44,7 @@ variant_settings:
third_party_settings: { } third_party_settings: { }
weight: 0 weight: 0
region: third region: third
weight: -1 weight: -8
uuid: fa5671b0-2af1-45de-8eae-3aa8bcc1be7d uuid: fa5671b0-2af1-45de-8eae-3aa8bcc1be7d
context_mapping: context_mapping:
entity: node entity: node
@ -61,7 +61,7 @@ variant_settings:
third_party_settings: { } third_party_settings: { }
weight: 0 weight: 0
region: third region: third
weight: -2 weight: -9
uuid: 8366d015-1ffd-4252-b8d3-fbeef9c0cd8d uuid: 8366d015-1ffd-4252-b8d3-fbeef9c0cd8d
context_mapping: context_mapping:
entity: node entity: node
@ -112,8 +112,8 @@ variant_settings:
link: true link: true
third_party_settings: { } third_party_settings: { }
weight: 0 weight: 0
region: third region: second
weight: 0 weight: 1
uuid: dc51d922-4083-40a8-9790-12c389b44e80 uuid: dc51d922-4083-40a8-9790-12c389b44e80
context_mapping: context_mapping:
entity: node entity: node
@ -129,8 +129,8 @@ variant_settings:
view_mode: default view_mode: default
third_party_settings: { } third_party_settings: { }
weight: 0 weight: 0
region: third region: second
weight: -4 weight: -1
uuid: 4a9634d1-b1a3-48c3-869b-487350961e1f uuid: 4a9634d1-b1a3-48c3-869b-487350961e1f
context_mapping: context_mapping:
entity: node entity: node
@ -163,8 +163,8 @@ variant_settings:
link: true link: true
third_party_settings: { } third_party_settings: { }
weight: 0 weight: 0
region: third region: second
weight: 1 weight: 2
uuid: 8e359f44-255d-4349-a740-8e9db75ebced uuid: 8e359f44-255d-4349-a740-8e9db75ebced
context_mapping: context_mapping:
entity: node entity: node
@ -197,8 +197,8 @@ variant_settings:
link: true link: true
third_party_settings: { } third_party_settings: { }
weight: 0 weight: 0
region: third region: second
weight: -3 weight: 0
uuid: 0d7b12da-76c6-471b-ab53-0e57b520915e uuid: 0d7b12da-76c6-471b-ab53-0e57b520915e
context_mapping: context_mapping:
entity: node entity: node
@ -214,8 +214,8 @@ variant_settings:
view_mode: default view_mode: default
third_party_settings: { } third_party_settings: { }
weight: 0 weight: 0
region: third region: second
weight: -5 weight: -2
uuid: 80ceb299-5738-410f-8448-79f438df51e7 uuid: 80ceb299-5738-410f-8448-79f438df51e7
context_mapping: context_mapping:
entity: node entity: node
@ -229,7 +229,8 @@ variant_settings:
region: first region: first
weight: -5 weight: -5
uuid: 9879675e-0278-482d-9ae0-bdffb5241640 uuid: 9879675e-0278-482d-9ae0-bdffb5241640
context_mapping: { } context_mapping:
field_programme_target_id: node
id: panels_variant id: panels_variant
uuid: 905f0d96-a78c-40f1-bb80-f259e145444f uuid: 905f0d96-a78c-40f1-bb80-f259e145444f
label: null label: null
@ -252,9 +253,4 @@ selection_criteria:
context_mapping: context_mapping:
node: node node: node
selection_logic: and selection_logic: and
static_context: static_context: { }
programme:
label: programme
type: 'entity_revision:node'
description: ''
value: 'node:field_programme'

View File

@ -4,13 +4,11 @@ status: true
dependencies: dependencies:
config: config:
- field.storage.node.field_date - field.storage.node.field_date
- field.storage.node.field_intro
- field.storage.node.field_sous_titre - field.storage.node.field_sous_titre
- node.type.evenement - node.type.evenement
module: module:
- datetime - datetime
- node - node
- text
- user - user
id: evenements id: evenements
label: 'Prog Événements' label: 'Prog Événements'
@ -251,68 +249,6 @@ display:
separator: ', ' separator: ', '
field_api_classes: false field_api_classes: false
plugin_id: field plugin_id: field
field_intro:
id: field_intro
table: node__field_intro
field: field_intro
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
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: text_default
settings: { }
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
plugin_id: field
filters: filters:
status: status:
value: '1' value: '1'
@ -355,7 +291,7 @@ display:
expose: expose:
label: '' label: ''
granularity: second granularity: second
title: 'Événements associée' title: 'Événements associés'
header: { } header: { }
footer: { } footer: { }
empty: { } empty: { }
@ -395,7 +331,8 @@ display:
break_phrase: false break_phrase: false
not: false not: false
plugin_id: numeric plugin_id: numeric
display_extenders: { } display_extenders:
views_ef_fieldset: { }
cache_metadata: cache_metadata:
max-age: -1 max-age: -1
contexts: contexts:
@ -406,7 +343,6 @@ display:
- user.permissions - user.permissions
tags: tags:
- 'config:field.storage.node.field_date' - 'config:field.storage.node.field_date'
- 'config:field.storage.node.field_intro'
- 'config:field.storage.node.field_sous_titre' - 'config:field.storage.node.field_sous_titre'
block_1: block_1:
display_plugin: block display_plugin: block
@ -427,5 +363,4 @@ display:
- user.permissions - user.permissions
tags: tags:
- 'config:field.storage.node.field_date' - 'config:field.storage.node.field_date'
- 'config:field.storage.node.field_intro'
- 'config:field.storage.node.field_sous_titre' - 'config:field.storage.node.field_sous_titre'

View File

@ -3,11 +3,13 @@ langcode: fr
status: true status: true
dependencies: dependencies:
config: config:
- core.entity_view_mode.node.teaser - field.storage.node.field_image
- field.storage.node.field_logo - field.storage.node.field_logo
- field.storage.node.field_programme
- field.storage.node.field_themes_lies - field.storage.node.field_themes_lies
- field.storage.node.field_ville - field.storage.node.field_ville
- image.style.medium - image.style.medium
- image.style.very_large
- node.type.actualite - node.type.actualite
- node.type.evenement - node.type.evenement
- node.type.programme - node.type.programme
@ -469,6 +471,8 @@ display:
filters: false filters: false
filter_groups: false filter_groups: false
fields: false fields: false
arguments: false
relationships: false
header: header:
result: result:
id: result id: result
@ -667,6 +671,55 @@ display:
separator: ', ' separator: ', '
field_api_classes: false field_api_classes: false
plugin_id: field plugin_id: field
arguments:
field_programme_target_id:
id: field_programme_target_id
table: node__field_programme
field: field_programme_target_id
relationship: none
group_type: group
admin_label: ''
default_action: default
exception:
value: all
title_enable: false
title: All
title_enable: false
title: ''
default_argument_type: node
default_argument_options: { }
default_argument_skip_url: false
summary_options:
base_path: ''
count: true
items_per_page: 25
override: false
summary:
sort_order: asc
number_of_records: 0
format: default_summary
specify_validation: true
validate:
type: 'entity:node'
fail: 'not found'
validate_options:
bundles:
programme: programme
operation: view
multiple: 0
access: false
break_phrase: false
not: false
plugin_id: numeric
allow:
items_per_page: true
configure_sorts: configure_sorts
offset: '0'
pager: '0'
hide_fields: '0'
sort_fields: '0'
disable_filters: '0'
relationships: { }
cache_metadata: cache_metadata:
max-age: -1 max-age: -1
contexts: contexts:
@ -852,69 +905,6 @@ display:
1: AND 1: AND
2: OR 2: OR
fields: fields:
field_ville:
id: field_ville
table: node__field_ville
field: field_ville
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: true
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: target_id
type: entity_reference_label
settings:
link: false
group_column: target_id
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
plugin_id: field
title: title:
id: title id: title
table: node_field_data table: node_field_data
@ -978,14 +968,196 @@ display:
separator: ', ' separator: ', '
field_api_classes: false field_api_classes: false
plugin_id: field plugin_id: field
field_image:
id: field_image
table: node__field_image
field: field_image
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: target_id
type: image
settings:
image_style: very_large
image_link: content
group_column: ''
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
plugin_id: field
view_node:
id: view_node
table: node
field: view_node
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
text: voir
output_url_as_text: false
absolute: false
entity_type: node
plugin_id: entity_link
field_programme:
id: field_programme
table: node__field_programme
field: field_programme
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: target_id
type: entity_reference_label
settings:
link: true
group_column: target_id
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
plugin_id: field
style: style:
type: default type: default
options: { } options: { }
row: row:
type: 'entity:node' type: fields
options: options:
relationship: none default_field_elements: true
view_mode: teaser inline: { }
separator: ''
hide_empty: false
pager: pager:
type: some type: some
options: options:
@ -1030,7 +1202,8 @@ display:
- 'user.node_grants:view' - 'user.node_grants:view'
- user.permissions - user.permissions
tags: tags:
- 'config:field.storage.node.field_ville' - 'config:field.storage.node.field_image'
- 'config:field.storage.node.field_programme'
block_6: block_6:
display_plugin: block display_plugin: block
id: block_6 id: block_6

View File

@ -3,12 +3,13 @@ langcode: fr
status: true status: true
dependencies: dependencies:
config: config:
- field.storage.node.field_diaporama - field.storage.node.field_logo
- image.style.medium - image.style.large
- node.type.programme - node.type.programme
module: module:
- image - image
- node - node
- popsu_programme
- user - user
id: programmes id: programmes
label: Programmes label: Programmes
@ -358,6 +359,9 @@ display:
title: false title: false
header: false header: false
fields: false fields: false
relationships: false
filters: false
filter_groups: false
block_category: 'home (Views)' block_category: 'home (Views)'
header: header:
result: result:
@ -371,6 +375,70 @@ display:
content: '@total programmes actifs' content: '@total programmes actifs'
plugin_id: result plugin_id: result
fields: fields:
field_logo:
id: field_logo
table: node__field_logo
field: field_logo
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: target_id
type: image
settings:
image_style: large
image_link: content
group_column: ''
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
plugin_id: field
title: title:
id: title id: title
table: node_field_data table: node_field_data
@ -434,10 +502,10 @@ display:
separator: ', ' separator: ', '
field_api_classes: false field_api_classes: false
plugin_id: field plugin_id: field
field_diaporama: computed_projets_reference:
id: field_diaporama id: computed_projets_reference
table: node__field_diaporama table: node
field: field_diaporama field: computed_projets_reference
relationship: none relationship: none
group_type: group group_type: group
admin_label: '' admin_label: ''
@ -482,22 +550,127 @@ display:
hide_empty: false hide_empty: false
empty_zero: false empty_zero: false
hide_alter_empty: true hide_alter_empty: true
click_sort_column: target_id entity_type: node
type: image plugin_id: views_computed_projets_reference
settings: computed_themes_reference:
image_style: medium id: computed_themes_reference
image_link: content table: node
group_column: '' field: computed_themes_reference
group_columns: { } relationship: none
group_rows: true group_type: group
delta_limit: 1 admin_label: ''
delta_offset: 0 label: ''
delta_reversed: false exclude: false
delta_first_last: false alter:
multi_type: separator alter_text: false
separator: ', ' text: ''
field_api_classes: false make_link: false
plugin_id: field path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
entity_type: node
plugin_id: views_computed_themes_reference
relationships: { }
filters:
status:
value: '1'
table: node_field_data
field: status
plugin_id: boolean
entity_type: node
entity_field: status
id: status
expose:
operator: ''
operator_limit_selection: false
operator_list: { }
group: 1
type:
id: type
table: node_field_data
field: type
value:
programme: programme
entity_type: node
entity_field: type
plugin_id: bundle
expose:
operator_limit_selection: false
operator_list: { }
field_actif_value:
id: field_actif_value
table: node__field_actif
field: field_actif_value
relationship: none
group_type: group
admin_label: ''
operator: '='
value: '1'
group: 1
exposed: false
expose:
operator_id: ''
label: ''
description: ''
use_operator: false
operator: ''
operator_limit_selection: false
operator_list: { }
identifier: ''
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
is_grouped: false
group_info:
label: ''
description: ''
identifier: ''
optional: true
widget: select
multiple: false
remember: false
default_group: All
default_group_multiple: { }
group_items: { }
plugin_id: boolean
filter_groups:
operator: AND
groups:
1: AND
cache_metadata: cache_metadata:
max-age: -1 max-age: -1
contexts: contexts:
@ -506,4 +679,4 @@ display:
- 'user.node_grants:view' - 'user.node_grants:view'
- user.permissions - user.permissions
tags: tags:
- 'config:field.storage.node.field_diaporama' - 'config:field.storage.node.field_logo'

View File

@ -0,0 +1,246 @@
uuid: 87dd26fa-1296-4690-bdd2-54c33259064e
langcode: fr
status: true
dependencies:
config:
- field.storage.node.field_textes
- node.type.static
module:
- entity_reference_revisions
- node
- user
id: static
label: static
module: views
description: ''
tag: ''
base_table: node_field_data
base_field: nid
display:
default:
display_plugin: default
id: default
display_title: Master
position: 0
display_options:
access:
type: perm
options:
perm: 'access content'
cache:
type: tag
options: { }
query:
type: views_query
options:
disable_sql_rewrite: false
distinct: false
replica: false
query_comment: ''
query_tags: { }
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
pager:
type: mini
options:
items_per_page: 10
offset: 0
id: 0
total_pages: null
expose:
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 25, 50'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
tags:
previous:
next:
style:
type: default
options:
grouping: { }
row_class: ''
default_row_class: true
uses_fields: false
row:
type: fields
options:
inline: { }
separator: ''
hide_empty: false
default_field_elements: true
fields:
field_textes:
id: field_textes
table: node__field_textes
field: field_textes
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: target_id
type: entity_reference_revisions_entity_view
settings:
view_mode: preview
group_column: ''
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: ul
separator: ', '
field_api_classes: false
plugin_id: field
filters:
status:
value: '1'
table: node_field_data
field: status
plugin_id: boolean
entity_type: node
entity_field: status
id: status
expose:
operator: ''
operator_limit_selection: false
operator_list: { }
group: 1
type:
id: type
table: node_field_data
field: type
value:
static: static
entity_type: node
entity_field: type
plugin_id: bundle
expose:
operator_limit_selection: false
operator_list: { }
sorts: { }
header: { }
footer: { }
empty: { }
relationships: { }
arguments:
nid:
id: nid
table: node_field_data
field: nid
relationship: none
group_type: group
admin_label: ''
default_action: default
exception:
value: all
title_enable: false
title: All
title_enable: false
title: ''
default_argument_type: node
default_argument_options: { }
default_argument_skip_url: false
summary_options:
base_path: ''
count: true
items_per_page: 25
override: false
summary:
sort_order: asc
number_of_records: 0
format: default_summary
specify_validation: true
validate:
type: none
fail: 'not found'
validate_options: { }
break_phrase: false
not: false
entity_type: node
entity_field: nid
plugin_id: node_nid
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- url.query_args
- 'user.node_grants:view'
- user.permissions
tags:
- 'config:field.storage.node.field_textes'
block_1:
display_plugin: block
id: block_1
display_title: 'Static textes paragraphes Bloc'
position: 1
display_options:
display_extenders:
views_ef_fieldset: { }
display_description: ''
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- url.query_args
- 'user.node_grants:view'
- user.permissions
tags:
- 'config:field.storage.node.field_textes'

View File

@ -0,0 +1,6 @@
views.field.view_computed_themes_reference:
type: views_field
label: 'Computed Themes Reference'
views.field.view_computed_projets_reference:
type: views_field
label: 'Computed Projets Reference'

View File

@ -0,0 +1,6 @@
name: Popsu Programme
type: module
description: misc plugins for popsu's programmes.
core_version_requirement: ^8.8 || ^9
package: Popsu
dependencies:

View File

@ -0,0 +1,88 @@
<?php
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\Core\Field\FieldStorageDefinitionInterface;
// https://www.drupal.org/project/drupal/issues/2916266#comment-12301574
/**
* Implement hook_entity_bundle_field_info().
*
* @param EntityTypeInterface $entity_type
* @param $bundle
* @param array $base_field_definitions
* @return array
*/
function popsu_programme_entity_bundle_field_info(EntityTypeInterface $entity_type, $bundle, array $base_field_definitions) {
// function materio_home_entity_base_field_info_alter(&$fields, EntityTypeInterface $entity_type) {
// $fields = array();
// if ($entity_type->id() == 'node' && $bundle === 'frontpage') {
// \Drupal::logger('materio_home')->notice('bundle: '.$bundle);
if ($entity_type->id() == 'node' && $bundle == 'programme') {
$fields['computed_themes_references'] = BaseFieldDefinition::create('entity_reference')
->setName('computed_themes_references')
->setLabel(t('Computed Themes References'))
->setDescription(t('Computed Themes References.'))
// // The Entity Type this field belongs to.
->setTargetEntityTypeId($entity_type->id())
// // The Entity Type bundle this field belongs to.
->setTargetBundle($bundle)
->setSetting('target_type', 'node')
->setCardinality(FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED)
->setComputed(TRUE)
->setRevisionable(FALSE)
->setTranslatable(FALSE)
->setDisplayConfigurable('view', TRUE)
->setDisplayOptions('view', [
'label' => 'hidden',
'weight' => -5,
])
->setClass(\Drupal\popsu_programme\Plugin\Field\FieldType\ComputedThemesReferences::class);
$fields['computed_projets_references'] = BaseFieldDefinition::create('entity_reference')
->setName('computed_projets_references')
->setLabel(t('Computed Projets References'))
->setDescription(t('Computed Projets References.'))
// // The Entity Type this field belongs to.
->setTargetEntityTypeId($entity_type->id())
// // The Entity Type bundle this field belongs to.
->setTargetBundle($bundle)
->setSetting('target_type', 'node')
->setCardinality(FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED)
->setComputed(TRUE)
->setRevisionable(FALSE)
->setTranslatable(FALSE)
->setDisplayConfigurable('view', TRUE)
->setDisplayOptions('view', [
'label' => 'hidden',
'weight' => -5,
])
->setClass(\Drupal\popsu_programme\Plugin\Field\FieldType\ComputedProjetsReferences::class);
return $fields;
}
}
/**
* Implements hook_views_data_alter().
*/
function popsu_programme_views_data_alter(array &$data) {
if (isset($data['node'])) {
// Add the computed_themes_reference field to Views.
$data['node']['computed_themes_reference'] = [
'title' => t('Computed Theme References'),
'field' => [
'id' => 'views_computed_themes_reference',
],
];
// Add the computed_projets_reference field to Views.
$data['node']['computed_projets_reference'] = [
'title' => t('Computed Projets References'),
'field' => [
'id' => 'views_computed_projets_reference',
],
];
}
}

View File

@ -0,0 +1,58 @@
<?php
namespace Drupal\popsu_programme\Plugin\Field\FieldType;
use Drupal\Core\Entity\FieldableEntityInterface;
use Drupal\Core\Field\EntityReferenceFieldItemList;
use Drupal\Core\Field\EntityReferenceFieldItemListInterface;
use Drupal\Core\Field\FieldItemList;
use Drupal\Core\TypedData\TypedDataInterface;
use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\Core\TypedData\ComputedItemListTrait;
// https://www.drupal.org/node/2112677
// https://www.cornel.co/article/entity-reference-computed-field-example-drupal
// https://www.caxy.com/blog/drupal-custom-form-and-computed-fields
class ComputedProjetsReferences extends EntityReferenceFieldItemList
{
use ComputedItemListTrait;
/**
* The entity type manager.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
/**
* {@inheritdoc}
*/
public function __construct(BaseFieldDefinition $definition, $name, TypedDataInterface $parent) {
parent::__construct($definition, $name, $parent);
$this->entityTypeManager = \Drupal::entityTypeManager();
}
/**
* Compute the values.
*/
protected function computeValue() {
// $query = \Drupal::entityQuery('node')
$entity = $this->getEntity();
$storage = \Drupal::service('entity_type.manager')->getStorage('node');
$query = $storage->getQuery()
->condition('status', 1)
->condition('type', 'projet')
->condition('field_programme', $entity->id());
$results = $query->execute();
if ($results) {
$nids = array_values($results);
$i = 0;
foreach ($nids as $key => $nid) {
$this->list[$i] = $this->createItem($i, $nid);
$i++;
}
}
}
}

View File

@ -0,0 +1,58 @@
<?php
namespace Drupal\popsu_programme\Plugin\Field\FieldType;
use Drupal\Core\Entity\FieldableEntityInterface;
use Drupal\Core\Field\EntityReferenceFieldItemList;
use Drupal\Core\Field\EntityReferenceFieldItemListInterface;
use Drupal\Core\Field\FieldItemList;
use Drupal\Core\TypedData\TypedDataInterface;
use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\Core\TypedData\ComputedItemListTrait;
// https://www.drupal.org/node/2112677
// https://www.cornel.co/article/entity-reference-computed-field-example-drupal
// https://www.caxy.com/blog/drupal-custom-form-and-computed-fields
class ComputedThemesReferences extends EntityReferenceFieldItemList
{
use ComputedItemListTrait;
/**
* The entity type manager.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
/**
* {@inheritdoc}
*/
public function __construct(BaseFieldDefinition $definition, $name, TypedDataInterface $parent) {
parent::__construct($definition, $name, $parent);
$this->entityTypeManager = \Drupal::entityTypeManager();
}
/**
* Compute the values.
*/
protected function computeValue() {
// $query = \Drupal::entityQuery('node')
$entity = $this->getEntity();
$storage = \Drupal::service('entity_type.manager')->getStorage('node');
$query = $storage->getQuery()
->condition('status', 1)
->condition('type', 'theme')
->condition('field_programme', $entity->id());
$results = $query->execute();
if ($results) {
$nids = array_values($results);
$i = 0;
foreach ($nids as $key => $nid) {
$this->list[$i] = $this->createItem($i, $nid);
$i++;
}
}
}
}

View File

@ -0,0 +1,46 @@
<?php
namespace Drupal\popsu_programme\Plugin\views\field;
use Drupal\views\ResultRow;
use Drupal\views\Plugin\views\field\FieldPluginBase;
/**
* A handler to provide proper displays for profile current company.
*
* @ingroup views_field_handlers
*
* @ViewsField("views_computed_projets_reference")
*/
class ViewsComputedProjetsReference extends FieldPluginBase {
/**
* {@inheritdoc}
*/
public function render(ResultRow $values) {
$relationship_entities = $values->_relationship_entities;
$projets = null;
// First check the referenced entity.
if (isset($relationship_entities['node'])) {
$node = $relationship_entities['node'];
}
else {
$node = $values->_entity;
}
$type = get_class($node);
if ($type === 'Drupal\node\Entity\Node') {
$projets = $node->get('computed_projets_references')->getvalue();
}
return count($projets) . ' villes';
}
/**
* {@inheritdoc}
*/
public function query() {
// This function exists to override parent query function.
// Do nothing.
}
}

View File

@ -0,0 +1,46 @@
<?php
namespace Drupal\popsu_programme\Plugin\views\field;
use Drupal\views\ResultRow;
use Drupal\views\Plugin\views\field\FieldPluginBase;
/**
* A handler to provide proper displays for profile current company.
*
* @ingroup views_field_handlers
*
* @ViewsField("views_computed_themes_reference")
*/
class ViewsComputedThemesReference extends FieldPluginBase {
/**
* {@inheritdoc}
*/
public function render(ResultRow $values) {
$relationship_entities = $values->_relationship_entities;
$themes = null;
// First check the referenced entity.
if (isset($relationship_entities['node'])) {
$node = $relationship_entities['node'];
}
else {
$node = $values->_entity;
}
$type = get_class($node);
if ($type === 'Drupal\node\Entity\Node') {
$themes = $node->get('computed_themes_references')->getvalue();
}
return count($themes) . ' themes';
}
/**
* {@inheritdoc}
*/
public function query() {
// This function exists to override parent query function.
// Do nothing.
}
}