diff --git a/composer.json b/composer.json
index 39597946..338837a5 100644
--- a/composer.json
+++ b/composer.json
@@ -47,6 +47,7 @@
"drupal/admin_toolbar": "^3.1",
"drupal/allowed_formats": "^2",
"drupal/anonymous_login": "^2.0",
+ "drupal/better_exposed_filters": "^7.0",
"drupal/bigint": "^2",
"drupal/bulk_update_fields": "^2.0@alpha",
"drupal/classy": "^1.0",
@@ -94,6 +95,8 @@
"drupal/seckit": "^2.0",
"drupal/social_auth_hid": "^3.1",
"drupal/stage_file_proxy": "^2",
+ "drupal/taxonomy_max_depth": "^2.1",
+ "drupal/taxonomy_term_depth": "^2.6",
"drupal/user_expire": "^1.0",
"drupal/username_enumeration_prevention": "^1.3",
"drupal/year": "^1.0",
diff --git a/composer.lock b/composer.lock
index 24057f45..e5544a59 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "0cfb4947e49e26880e20a6549ed0b7dc",
+ "content-hash": "0a2bb4d3373070ff2d67030961ce73e9",
"packages": [
{
"name": "asm89/stack-cors",
@@ -2679,6 +2679,79 @@
"source": "https://git.drupalcode.org/project/anonymous_login"
}
},
+ {
+ "name": "drupal/better_exposed_filters",
+ "version": "7.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://git.drupalcode.org/project/better_exposed_filters.git",
+ "reference": "7.0.2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://ftp.drupal.org/files/projects/better_exposed_filters-7.0.2.zip",
+ "reference": "7.0.2",
+ "shasum": "11f6b9021867690e2284325b3c21acdac8a94bb4"
+ },
+ "require": {
+ "drupal/core": "^10 || ^11"
+ },
+ "type": "drupal-module",
+ "extra": {
+ "drupal": {
+ "version": "7.0.2",
+ "datestamp": "1729001179",
+ "security-coverage": {
+ "status": "covered",
+ "message": "Covered by Drupal's security advisory policy"
+ }
+ }
+ },
+ "notification-url": "https://packages.drupal.org/8/downloads",
+ "license": [
+ "GPL-2.0-or-later"
+ ],
+ "authors": [
+ {
+ "name": "Mike Keran",
+ "homepage": "https://www.drupal.org/u/mikeker"
+ },
+ {
+ "name": "Martin Keereman",
+ "homepage": "https://www.drupal.org/u/etroid"
+ },
+ {
+ "name": "Neslee Canil Pinto",
+ "homepage": "https://www.drupal.org/u/neslee-canil-pinto"
+ },
+ {
+ "name": "mikeker",
+ "homepage": "https://www.drupal.org/user/192273"
+ },
+ {
+ "name": "neslee canil pinto",
+ "homepage": "https://www.drupal.org/user/3580850"
+ },
+ {
+ "name": "podarok",
+ "homepage": "https://www.drupal.org/user/116002"
+ },
+ {
+ "name": "rlhawk",
+ "homepage": "https://www.drupal.org/user/352283"
+ },
+ {
+ "name": "smustgrave",
+ "homepage": "https://www.drupal.org/user/3252890"
+ }
+ ],
+ "description": "Replaces the Views default single- or multi-select boxes with more advanced options.",
+ "homepage": "https://www.drupal.org/project/better_exposed_filters",
+ "support": {
+ "source": "https://git.drupalcode.org/project/better_exposed_filters",
+ "issues": "https://www.drupal.org/project/issues/better_exposed_filters"
+ }
+ },
{
"name": "drupal/bigint",
"version": "2.0.1",
@@ -6552,6 +6625,106 @@
"source": "https://git.drupalcode.org/project/stage_file_proxy"
}
},
+ {
+ "name": "drupal/taxonomy_max_depth",
+ "version": "2.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://git.drupalcode.org/project/taxonomy_max_depth.git",
+ "reference": "2.1.0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://ftp.drupal.org/files/projects/taxonomy_max_depth-2.1.0.zip",
+ "reference": "2.1.0",
+ "shasum": "b3a9b433d20006b6f23fb7e48d59ebedb8e3e36e"
+ },
+ "require": {
+ "drupal/core": "^9 || ^10 || ^11"
+ },
+ "type": "drupal-module",
+ "extra": {
+ "drupal": {
+ "version": "2.1.0",
+ "datestamp": "1725415790",
+ "security-coverage": {
+ "status": "covered",
+ "message": "Covered by Drupal's security advisory policy"
+ }
+ }
+ },
+ "notification-url": "https://packages.drupal.org/8/downloads",
+ "license": [
+ "GPL-2.0-or-later"
+ ],
+ "authors": [
+ {
+ "name": "dmitriy.trt",
+ "homepage": "https://www.drupal.org/user/329125"
+ }
+ ],
+ "description": "Allows you to specify max term depth per taxonomy vocabulary.",
+ "homepage": "https://www.drupal.org/project/taxonomy_max_depth",
+ "support": {
+ "source": "https://git.drupalcode.org/project/taxonomy_max_depth"
+ }
+ },
+ {
+ "name": "drupal/taxonomy_term_depth",
+ "version": "2.6.0",
+ "source": {
+ "type": "git",
+ "url": "https://git.drupalcode.org/project/taxonomy_term_depth.git",
+ "reference": "8.x-2.6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://ftp.drupal.org/files/projects/taxonomy_term_depth-8.x-2.6.zip",
+ "reference": "8.x-2.6",
+ "shasum": "767bccb9dc06bb6d89872bc38943c89b09f75a03"
+ },
+ "require": {
+ "drupal/core": "^8 || ^9 || ^10"
+ },
+ "type": "drupal-module",
+ "extra": {
+ "drupal": {
+ "version": "8.x-2.6",
+ "datestamp": "1684849556",
+ "security-coverage": {
+ "status": "covered",
+ "message": "Covered by Drupal's security advisory policy"
+ }
+ }
+ },
+ "notification-url": "https://packages.drupal.org/8/downloads",
+ "license": [
+ "GPL-2.0+"
+ ],
+ "authors": [
+ {
+ "name": "Cadila",
+ "homepage": "https://www.drupal.org/user/2669241"
+ },
+ {
+ "name": "joseph.olstad",
+ "homepage": "https://www.drupal.org/user/1321830"
+ },
+ {
+ "name": "Liam Morland",
+ "homepage": "https://www.drupal.org/user/493050"
+ },
+ {
+ "name": "miteshmap",
+ "homepage": "https://www.drupal.org/user/1404966"
+ }
+ ],
+ "description": "Provides field for storing taxonomy depth value and some wrappers integration with modules",
+ "homepage": "http://drupal.org/project/taxonomy_term_depth",
+ "support": {
+ "source": "https://git.drupalcode.org/project/taxonomy_term_depth"
+ }
+ },
{
"name": "drupal/token",
"version": "1.15.0",
diff --git a/composer.patches.json b/composer.patches.json
index 07b994e7..7b0ca6d4 100644
--- a/composer.patches.json
+++ b/composer.patches.json
@@ -1,7 +1,8 @@
{
"patches": {
"drupal/active_tags": {
- "Issue #?": "./patches/active-tags-handle-no-match-message.patch"
+ "Issue #3481823: HTML tags appear in 'Not exist' and 'Not found' messages": "https://www.drupal.org/files/issues/2024-11-08/3481823-3.patch",
+ "Issue #3486362: Limit 0 for select dropdowns is not respected": "https://git.drupalcode.org/project/active_tags/-/merge_requests/2.patch"
},
"drupal/core": {
"Issue #2544110: XSS attribute filtering is inconsistent and strips valid attributes": "./patches/2544110-2024-02-15.patch",
diff --git a/config/core.entity_form_display.node.article.default.yml b/config/core.entity_form_display.node.article.default.yml
index 9cafebb5..84652671 100755
--- a/config/core.entity_form_display.node.article.default.yml
+++ b/config/core.entity_form_display.node.article.default.yml
@@ -13,12 +13,14 @@ dependencies:
- field.field.node.article.field_country
- field.field.node.article.field_document_type
- field.field.node.article.field_hero_image
+ - field.field.node.article.field_month
- field.field.node.article.field_paragraphs
- field.field.node.article.field_pdf
- field.field.node.article.field_report_link
- field.field.node.article.field_short_title
- field.field.node.article.field_summary
- field.field.node.article.field_tags
+ - field.field.node.article.field_theme
- field.field.node.article.field_thumbnail_image
- field.field.node.article.field_year
- node.type.article
@@ -58,8 +60,9 @@ third_party_settings:
- field_content_space
- field_document_type
- field_year
+ - field_month
- field_country
- - field_tags
+ - field_theme
- field_author
- field_pdf
- field_automatically_visible
@@ -124,7 +127,7 @@ content:
third_party_settings: { }
field_author:
type: inline_entity_form_complex
- weight: 27
+ weight: 8
region: content
settings:
form_mode: default
@@ -142,7 +145,7 @@ content:
third_party_settings: { }
field_automatically_visible:
type: boolean_checkbox
- weight: 29
+ weight: 10
region: content
settings:
display_label: true
@@ -176,25 +179,29 @@ content:
third_party_settings: { }
field_content_space:
type: options_select
- weight: 22
+ weight: 1
region: content
settings: { }
third_party_settings: { }
field_country:
type: select_active_tags
- weight: 25
+ weight: 5
region: content
settings:
match_operator: CONTAINS
style: rectangle
- match_limit: 10
+ match_limit: 0
placeholder: ''
third_party_settings: { }
field_document_type:
- type: options_select
- weight: 23
+ type: select_active_tags
+ weight: 2
region: content
- settings: { }
+ settings:
+ match_operator: CONTAINS
+ style: rectangle
+ match_limit: 0
+ placeholder: ''
third_party_settings: { }
field_hero_image:
type: media_library_widget
@@ -203,6 +210,16 @@ content:
settings:
media_types: { }
third_party_settings: { }
+ field_month:
+ type: select_active_tags
+ weight: 4
+ region: content
+ settings:
+ match_operator: CONTAINS
+ style: rectangle
+ match_limit: 0
+ placeholder: ''
+ third_party_settings: { }
field_paragraphs:
type: layout_paragraphs
weight: 7
@@ -217,7 +234,7 @@ content:
third_party_settings: { }
field_pdf:
type: file_generic
- weight: 28
+ weight: 9
region: content
settings:
progress_indicator: throbber
@@ -245,9 +262,9 @@ content:
allowed_formats:
hide_help: '1'
hide_guidelines: '1'
- field_tags:
+ field_theme:
type: entity_reference_autocomplete_active_tags
- weight: 26
+ weight: 6
region: content
settings:
autocomplete_route_name: active_tags.entity_autocomplete
@@ -255,28 +272,28 @@ content:
style: rectangle
size: 60
selection_handler: default
- match_limit: 0
+ match_limit: 10
min_length: 1
delimiter: ''
- placeholder: 'Article tags'
+ placeholder: ''
show_avatar: 1
show_entity_id: 0
convert_uppercase: 0
string_override: 0
show_info_label: 0
info_label: ''
- not_exist_message: "No matches found, Press Enter to add '@term'."
- not_found_message: "No matching suggestions found for '@term'."
+ not_exist_message: null
+ not_found_message: null
limit_tag_message: 'Allowed number of values limited to @cardinality.'
third_party_settings: { }
field_year:
type: select_active_tags
- weight: 24
+ weight: 3
region: content
settings:
match_operator: CONTAINS
style: rectangle
- match_limit: 10
+ match_limit: 0
placeholder: ''
third_party_settings: { }
moderation_state:
@@ -305,6 +322,7 @@ hidden:
field_card_title: true
field_computed_tags: true
field_report_link: true
+ field_tags: true
field_thumbnail_image: true
langcode: true
path: true
diff --git a/config/core.entity_form_display.node.document.default.yml b/config/core.entity_form_display.node.document.default.yml
index 206430a1..c7a0cf2d 100644
--- a/config/core.entity_form_display.node.document.default.yml
+++ b/config/core.entity_form_display.node.document.default.yml
@@ -10,10 +10,12 @@ dependencies:
- field.field.node.document.field_country
- field.field.node.document.field_document_type
- field.field.node.document.field_hero_image
+ - field.field.node.document.field_month
- field.field.node.document.field_paragraphs
- field.field.node.document.field_short_title
- field.field.node.document.field_summary
- field.field.node.document.field_tags
+ - field.field.node.document.field_theme
- field.field.node.document.field_year
- node.type.document
module:
@@ -63,8 +65,9 @@ third_party_settings:
- field_content_space
- field_document_type
- field_year
+ - field_month
- field_country
- - field_tags
+ - field_theme
- field_summary
- field_automatically_visible
label: Properties
@@ -108,7 +111,7 @@ content:
third_party_settings: { }
field_automatically_visible:
type: boolean_checkbox
- weight: 33
+ weight: 35
region: content
settings:
display_label: true
@@ -144,19 +147,23 @@ content:
third_party_settings: { }
field_country:
type: select_active_tags
- weight: 30
+ weight: 31
region: content
settings:
match_operator: CONTAINS
style: rectangle
- match_limit: 10
+ match_limit: 0
placeholder: ''
third_party_settings: { }
field_document_type:
- type: options_select
+ type: select_active_tags
weight: 28
region: content
- settings: { }
+ settings:
+ match_operator: CONTAINS
+ style: rectangle
+ match_limit: 0
+ placeholder: ''
third_party_settings: { }
field_hero_image:
type: media_library_widget
@@ -165,6 +172,16 @@ content:
settings:
media_types: { }
third_party_settings: { }
+ field_month:
+ type: select_active_tags
+ weight: 30
+ region: content
+ settings:
+ match_operator: CONTAINS
+ style: rectangle
+ match_limit: 0
+ placeholder: ''
+ third_party_settings: { }
field_paragraphs:
type: layout_paragraphs
weight: 4
@@ -191,15 +208,15 @@ content:
maxlength_js_enforce: true
field_summary:
type: text_textarea
- weight: 32
+ weight: 34
region: content
settings:
rows: 5
placeholder: ''
third_party_settings: { }
- field_tags:
+ field_theme:
type: entity_reference_autocomplete_active_tags
- weight: 31
+ weight: 32
region: content
settings:
autocomplete_route_name: active_tags.entity_autocomplete
@@ -210,15 +227,15 @@ content:
match_limit: 10
min_length: 1
delimiter: ''
- placeholder: 'Document tags'
+ placeholder: ''
show_avatar: 1
show_entity_id: 0
convert_uppercase: 0
string_override: 0
show_info_label: 0
info_label: ''
- not_exist_message: "No matches found, Press Enter to add '@term'."
- not_found_message: "No matching suggestions found for '@term'."
+ not_exist_message: null
+ not_found_message: null
limit_tag_message: 'Allowed number of values limited to @cardinality.'
third_party_settings: { }
field_year:
@@ -228,7 +245,7 @@ content:
settings:
match_operator: CONTAINS
style: rectangle
- match_limit: 10
+ match_limit: 0
placeholder: ''
third_party_settings: { }
langcode:
@@ -278,6 +295,7 @@ content:
third_party_settings: { }
hidden:
field_computed_tags: true
+ field_tags: true
path: true
promote: true
sticky: true
diff --git a/config/core.entity_form_display.paragraph.document_chapter.default.yml b/config/core.entity_form_display.paragraph.document_chapter.default.yml
index 0618ba6f..1008caa0 100644
--- a/config/core.entity_form_display.paragraph.document_chapter.default.yml
+++ b/config/core.entity_form_display.paragraph.document_chapter.default.yml
@@ -9,15 +9,16 @@ dependencies:
- field.field.paragraph.document_chapter.field_country
- field.field.paragraph.document_chapter.field_document_type
- field.field.paragraph.document_chapter.field_hide_from_navigation
+ - field.field.paragraph.document_chapter.field_month
- field.field.paragraph.document_chapter.field_short_title
- field.field.paragraph.document_chapter.field_summary
- field.field.paragraph.document_chapter.field_tags
+ - field.field.paragraph.document_chapter.field_theme
- field.field.paragraph.document_chapter.field_title
- field.field.paragraph.document_chapter.field_year
- paragraphs.paragraphs_type.document_chapter
module:
- active_tags
- - computed_field
- field_group
- ncms_ui
third_party_settings:
@@ -89,8 +90,9 @@ third_party_settings:
children:
- field_document_type
- field_year
+ - field_month
- field_country
- - field_tags
+ - field_theme
label: Tags
region: content
parent_name: group_tabs
@@ -126,27 +128,25 @@ content:
field_widget_replace: 0
field_widget_display_settings: { }
third_party_settings: { }
- field_computed_tags:
- type: computed_string_widget
- weight: 3
- region: content
- settings: { }
- third_party_settings: { }
field_country:
type: select_active_tags
- weight: 8
+ weight: 9
region: content
settings:
match_operator: CONTAINS
style: rectangle
- match_limit: 10
+ match_limit: 0
placeholder: ''
third_party_settings: { }
field_document_type:
- type: options_select
+ type: select_active_tags
weight: 6
region: content
- settings: { }
+ settings:
+ match_operator: CONTAINS
+ style: rectangle
+ match_limit: 0
+ placeholder: ''
third_party_settings: { }
field_hide_from_navigation:
type: boolean_checkbox
@@ -155,6 +155,16 @@ content:
settings:
display_label: true
third_party_settings: { }
+ field_month:
+ type: select_active_tags
+ weight: 8
+ region: content
+ settings:
+ match_operator: CONTAINS
+ style: rectangle
+ match_limit: 0
+ placeholder: ''
+ third_party_settings: { }
field_short_title:
type: string_textfield
weight: 22
@@ -175,9 +185,9 @@ content:
rows: 5
placeholder: ''
third_party_settings: { }
- field_tags:
+ field_theme:
type: entity_reference_autocomplete_active_tags
- weight: 9
+ weight: 10
region: content
settings:
autocomplete_route_name: active_tags.entity_autocomplete
@@ -195,8 +205,8 @@ content:
string_override: 0
show_info_label: 0
info_label: ''
- not_exist_message: "No matches found, Press Enter to add '@term'."
- not_found_message: "No matching suggestions found for '@term'."
+ not_exist_message: null
+ not_found_message: null
limit_tag_message: 'Allowed number of values limited to @cardinality.'
third_party_settings: { }
field_title:
@@ -214,7 +224,7 @@ content:
settings:
match_operator: CONTAINS
style: rectangle
- match_limit: 10
+ match_limit: 0
placeholder: ''
third_party_settings: { }
status:
@@ -226,3 +236,5 @@ content:
third_party_settings: { }
hidden:
created: true
+ field_computed_tags: true
+ field_tags: true
diff --git a/config/core.entity_form_display.taxonomy_term.content_space.default.yml b/config/core.entity_form_display.taxonomy_term.content_space.default.yml
index 5f1e59cf..bb1a1c28 100755
--- a/config/core.entity_form_display.taxonomy_term.content_space.default.yml
+++ b/config/core.entity_form_display.taxonomy_term.content_space.default.yml
@@ -3,6 +3,8 @@ langcode: en
status: true
dependencies:
config:
+ - field.field.taxonomy_term.content_space.field_computed_tags
+ - field.field.taxonomy_term.content_space.field_country
- field.field.taxonomy_term.content_space.field_major_tags
- taxonomy.vocabulary.content_space
module:
@@ -13,29 +15,15 @@ targetEntityType: taxonomy_term
bundle: content_space
mode: default
content:
- field_major_tags:
- type: entity_reference_autocomplete_active_tags
+ field_country:
+ type: select_active_tags
weight: 1
region: content
settings:
- autocomplete_route_name: active_tags.entity_autocomplete
match_operator: CONTAINS
style: rectangle
- size: 60
- selection_handler: default
match_limit: 10
- min_length: 1
- delimiter: ''
placeholder: ''
- show_avatar: 1
- show_entity_id: 0
- convert_uppercase: 0
- string_override: 0
- show_info_label: 0
- info_label: ''
- not_exist_message: "No matches found, Press Enter to add '@term'."
- not_found_message: "No matching suggestions found for '@term'."
- limit_tag_message: 'Allowed number of values limited to @cardinality.'
third_party_settings: { }
langcode:
type: language_select
@@ -67,3 +55,5 @@ content:
third_party_settings: { }
hidden:
description: true
+ field_computed_tags: true
+ field_major_tags: true
diff --git a/config/core.entity_view_display.node.article.default.yml b/config/core.entity_view_display.node.article.default.yml
index 3c14e45a..acd6cea6 100755
--- a/config/core.entity_view_display.node.article.default.yml
+++ b/config/core.entity_view_display.node.article.default.yml
@@ -13,12 +13,14 @@ dependencies:
- field.field.node.article.field_country
- field.field.node.article.field_document_type
- field.field.node.article.field_hero_image
+ - field.field.node.article.field_month
- field.field.node.article.field_paragraphs
- field.field.node.article.field_pdf
- field.field.node.article.field_report_link
- field.field.node.article.field_short_title
- field.field.node.article.field_summary
- field.field.node.article.field_tags
+ - field.field.node.article.field_theme
- field.field.node.article.field_thumbnail_image
- field.field.node.article.field_year
- node.type.article
@@ -112,10 +114,12 @@ hidden:
field_content_space: true
field_country: true
field_document_type: true
+ field_month: true
field_pdf: true
field_report_link: true
field_summary: true
field_tags: true
+ field_theme: true
field_thumbnail_image: true
field_year: true
langcode: true
diff --git a/config/core.entity_view_display.node.article.full.yml b/config/core.entity_view_display.node.article.full.yml
index 5daad674..bb101bc1 100644
--- a/config/core.entity_view_display.node.article.full.yml
+++ b/config/core.entity_view_display.node.article.full.yml
@@ -14,12 +14,14 @@ dependencies:
- field.field.node.article.field_country
- field.field.node.article.field_document_type
- field.field.node.article.field_hero_image
+ - field.field.node.article.field_month
- field.field.node.article.field_paragraphs
- field.field.node.article.field_pdf
- field.field.node.article.field_report_link
- field.field.node.article.field_short_title
- field.field.node.article.field_summary
- field.field.node.article.field_tags
+ - field.field.node.article.field_theme
- field.field.node.article.field_thumbnail_image
- field.field.node.article.field_year
- node.type.article
@@ -110,11 +112,13 @@ hidden:
field_content_space: true
field_country: true
field_document_type: true
+ field_month: true
field_pdf: true
field_report_link: true
field_short_title: true
field_summary: true
field_tags: true
+ field_theme: true
field_thumbnail_image: true
field_year: true
langcode: true
diff --git a/config/core.entity_view_display.node.article.home_page.yml b/config/core.entity_view_display.node.article.home_page.yml
index 5abe43cd..0bba2cad 100755
--- a/config/core.entity_view_display.node.article.home_page.yml
+++ b/config/core.entity_view_display.node.article.home_page.yml
@@ -14,12 +14,14 @@ dependencies:
- field.field.node.article.field_country
- field.field.node.article.field_document_type
- field.field.node.article.field_hero_image
+ - field.field.node.article.field_month
- field.field.node.article.field_paragraphs
- field.field.node.article.field_pdf
- field.field.node.article.field_report_link
- field.field.node.article.field_short_title
- field.field.node.article.field_summary
- field.field.node.article.field_tags
+ - field.field.node.article.field_theme
- field.field.node.article.field_thumbnail_image
- field.field.node.article.field_year
- node.type.article
@@ -115,9 +117,11 @@ hidden:
field_content_space: true
field_country: true
field_document_type: true
+ field_month: true
field_pdf: true
field_short_title: true
field_tags: true
+ field_theme: true
field_thumbnail_image: true
field_year: true
langcode: true
diff --git a/config/core.entity_view_display.node.article.layout_paragraphs_preview_table.yml b/config/core.entity_view_display.node.article.layout_paragraphs_preview_table.yml
index a101e4da..93cb4e67 100644
--- a/config/core.entity_view_display.node.article.layout_paragraphs_preview_table.yml
+++ b/config/core.entity_view_display.node.article.layout_paragraphs_preview_table.yml
@@ -14,12 +14,14 @@ dependencies:
- field.field.node.article.field_country
- field.field.node.article.field_document_type
- field.field.node.article.field_hero_image
+ - field.field.node.article.field_month
- field.field.node.article.field_paragraphs
- field.field.node.article.field_pdf
- field.field.node.article.field_report_link
- field.field.node.article.field_short_title
- field.field.node.article.field_summary
- field.field.node.article.field_tags
+ - field.field.node.article.field_theme
- field.field.node.article.field_thumbnail_image
- field.field.node.article.field_year
- node.type.article
@@ -73,11 +75,13 @@ hidden:
field_country: true
field_document_type: true
field_hero_image: true
+ field_month: true
field_paragraphs: true
field_pdf: true
field_report_link: true
field_short_title: true
field_summary: true
+ field_theme: true
field_thumbnail_image: true
field_year: true
langcode: true
diff --git a/config/core.entity_view_display.node.article.preview.yml b/config/core.entity_view_display.node.article.preview.yml
index e81aa150..627f8c5e 100755
--- a/config/core.entity_view_display.node.article.preview.yml
+++ b/config/core.entity_view_display.node.article.preview.yml
@@ -14,12 +14,14 @@ dependencies:
- field.field.node.article.field_country
- field.field.node.article.field_document_type
- field.field.node.article.field_hero_image
+ - field.field.node.article.field_month
- field.field.node.article.field_paragraphs
- field.field.node.article.field_pdf
- field.field.node.article.field_report_link
- field.field.node.article.field_short_title
- field.field.node.article.field_summary
- field.field.node.article.field_tags
+ - field.field.node.article.field_theme
- field.field.node.article.field_thumbnail_image
- field.field.node.article.field_year
- node.type.article
@@ -98,11 +100,13 @@ hidden:
field_content_space: true
field_country: true
field_document_type: true
+ field_month: true
field_pdf: true
field_report_link: true
field_short_title: true
field_summary: true
field_tags: true
+ field_theme: true
field_thumbnail_image: true
field_year: true
langcode: true
diff --git a/config/core.entity_view_display.node.article.related_article.yml b/config/core.entity_view_display.node.article.related_article.yml
index 2e976bfc..9f732aec 100755
--- a/config/core.entity_view_display.node.article.related_article.yml
+++ b/config/core.entity_view_display.node.article.related_article.yml
@@ -14,12 +14,14 @@ dependencies:
- field.field.node.article.field_country
- field.field.node.article.field_document_type
- field.field.node.article.field_hero_image
+ - field.field.node.article.field_month
- field.field.node.article.field_paragraphs
- field.field.node.article.field_pdf
- field.field.node.article.field_report_link
- field.field.node.article.field_short_title
- field.field.node.article.field_summary
- field.field.node.article.field_tags
+ - field.field.node.article.field_theme
- field.field.node.article.field_thumbnail_image
- field.field.node.article.field_year
- node.type.article
@@ -81,11 +83,13 @@ hidden:
field_country: true
field_document_type: true
field_hero_image: true
+ field_month: true
field_paragraphs: true
field_pdf: true
field_report_link: true
field_short_title: true
field_tags: true
+ field_theme: true
field_year: true
langcode: true
links: true
diff --git a/config/core.entity_view_display.node.article.sub_article.yml b/config/core.entity_view_display.node.article.sub_article.yml
index 4b0024ee..018df5dc 100755
--- a/config/core.entity_view_display.node.article.sub_article.yml
+++ b/config/core.entity_view_display.node.article.sub_article.yml
@@ -14,12 +14,14 @@ dependencies:
- field.field.node.article.field_country
- field.field.node.article.field_document_type
- field.field.node.article.field_hero_image
+ - field.field.node.article.field_month
- field.field.node.article.field_paragraphs
- field.field.node.article.field_pdf
- field.field.node.article.field_report_link
- field.field.node.article.field_short_title
- field.field.node.article.field_summary
- field.field.node.article.field_tags
+ - field.field.node.article.field_theme
- field.field.node.article.field_thumbnail_image
- field.field.node.article.field_year
- node.type.article
@@ -90,11 +92,13 @@ hidden:
field_country: true
field_document_type: true
field_hero_image: true
+ field_month: true
field_pdf: true
field_report_link: true
field_short_title: true
field_summary: true
field_tags: true
+ field_theme: true
field_thumbnail_image: true
field_year: true
langcode: true
diff --git a/config/core.entity_view_display.node.article.teaser.yml b/config/core.entity_view_display.node.article.teaser.yml
index f78a6df3..17c76286 100755
--- a/config/core.entity_view_display.node.article.teaser.yml
+++ b/config/core.entity_view_display.node.article.teaser.yml
@@ -14,12 +14,14 @@ dependencies:
- field.field.node.article.field_country
- field.field.node.article.field_document_type
- field.field.node.article.field_hero_image
+ - field.field.node.article.field_month
- field.field.node.article.field_paragraphs
- field.field.node.article.field_pdf
- field.field.node.article.field_report_link
- field.field.node.article.field_short_title
- field.field.node.article.field_summary
- field.field.node.article.field_tags
+ - field.field.node.article.field_theme
- field.field.node.article.field_thumbnail_image
- field.field.node.article.field_year
- node.type.article
@@ -76,11 +78,13 @@ hidden:
field_country: true
field_document_type: true
field_hero_image: true
+ field_month: true
field_paragraphs: true
field_pdf: true
field_report_link: true
field_short_title: true
field_tags: true
+ field_theme: true
field_year: true
langcode: true
links: true
diff --git a/config/core.entity_view_display.node.article.teaser_card.yml b/config/core.entity_view_display.node.article.teaser_card.yml
index 83f7c215..cc5bec04 100755
--- a/config/core.entity_view_display.node.article.teaser_card.yml
+++ b/config/core.entity_view_display.node.article.teaser_card.yml
@@ -14,12 +14,14 @@ dependencies:
- field.field.node.article.field_country
- field.field.node.article.field_document_type
- field.field.node.article.field_hero_image
+ - field.field.node.article.field_month
- field.field.node.article.field_paragraphs
- field.field.node.article.field_pdf
- field.field.node.article.field_report_link
- field.field.node.article.field_short_title
- field.field.node.article.field_summary
- field.field.node.article.field_tags
+ - field.field.node.article.field_theme
- field.field.node.article.field_thumbnail_image
- field.field.node.article.field_year
- image.style.572_x_360
@@ -83,11 +85,13 @@ hidden:
field_content_space: true
field_country: true
field_document_type: true
+ field_month: true
field_paragraphs: true
field_pdf: true
field_report_link: true
field_short_title: true
field_tags: true
+ field_theme: true
field_thumbnail_image: true
field_year: true
langcode: true
diff --git a/config/core.entity_view_display.node.document.default.yml b/config/core.entity_view_display.node.document.default.yml
index 56a84b51..6a6ec65f 100644
--- a/config/core.entity_view_display.node.document.default.yml
+++ b/config/core.entity_view_display.node.document.default.yml
@@ -10,10 +10,12 @@ dependencies:
- field.field.node.document.field_country
- field.field.node.document.field_document_type
- field.field.node.document.field_hero_image
+ - field.field.node.document.field_month
- field.field.node.document.field_paragraphs
- field.field.node.document.field_short_title
- field.field.node.document.field_summary
- field.field.node.document.field_tags
+ - field.field.node.document.field_theme
- field.field.node.document.field_year
- node.type.document
module:
@@ -99,8 +101,10 @@ hidden:
field_content_space: true
field_country: true
field_document_type: true
+ field_month: true
field_summary: true
field_tags: true
+ field_theme: true
field_year: true
langcode: true
links: true
diff --git a/config/core.entity_view_display.node.document.full.yml b/config/core.entity_view_display.node.document.full.yml
index 1af5009d..35758eb7 100644
--- a/config/core.entity_view_display.node.document.full.yml
+++ b/config/core.entity_view_display.node.document.full.yml
@@ -11,10 +11,12 @@ dependencies:
- field.field.node.document.field_country
- field.field.node.document.field_document_type
- field.field.node.document.field_hero_image
+ - field.field.node.document.field_month
- field.field.node.document.field_paragraphs
- field.field.node.document.field_short_title
- field.field.node.document.field_summary
- field.field.node.document.field_tags
+ - field.field.node.document.field_theme
- field.field.node.document.field_year
- node.type.document
module:
@@ -73,9 +75,11 @@ hidden:
field_content_space: true
field_country: true
field_document_type: true
+ field_month: true
field_short_title: true
field_summary: true
field_tags: true
+ field_theme: true
field_year: true
langcode: true
links: true
diff --git a/config/core.entity_view_display.node.document.teaser.yml b/config/core.entity_view_display.node.document.teaser.yml
index 16fd01dd..b53ad8a3 100644
--- a/config/core.entity_view_display.node.document.teaser.yml
+++ b/config/core.entity_view_display.node.document.teaser.yml
@@ -11,10 +11,12 @@ dependencies:
- field.field.node.document.field_country
- field.field.node.document.field_document_type
- field.field.node.document.field_hero_image
+ - field.field.node.document.field_month
- field.field.node.document.field_paragraphs
- field.field.node.document.field_short_title
- field.field.node.document.field_summary
- field.field.node.document.field_tags
+ - field.field.node.document.field_theme
- field.field.node.document.field_year
- node.type.document
module:
@@ -50,10 +52,12 @@ hidden:
field_country: true
field_document_type: true
field_hero_image: true
+ field_month: true
field_paragraphs: true
field_short_title: true
field_summary: true
field_tags: true
+ field_theme: true
field_year: true
langcode: true
links: true
diff --git a/config/core.entity_view_display.paragraph.document_chapter.default.yml b/config/core.entity_view_display.paragraph.document_chapter.default.yml
index 3b933330..93a15253 100644
--- a/config/core.entity_view_display.paragraph.document_chapter.default.yml
+++ b/config/core.entity_view_display.paragraph.document_chapter.default.yml
@@ -8,9 +8,11 @@ dependencies:
- field.field.paragraph.document_chapter.field_country
- field.field.paragraph.document_chapter.field_document_type
- field.field.paragraph.document_chapter.field_hide_from_navigation
+ - field.field.paragraph.document_chapter.field_month
- field.field.paragraph.document_chapter.field_short_title
- field.field.paragraph.document_chapter.field_summary
- field.field.paragraph.document_chapter.field_tags
+ - field.field.paragraph.document_chapter.field_theme
- field.field.paragraph.document_chapter.field_title
- field.field.paragraph.document_chapter.field_year
- paragraphs.paragraphs_type.document_chapter
@@ -35,6 +37,14 @@ content:
third_party_settings: { }
weight: 1
region: content
+ field_theme:
+ type: entity_reference_label
+ label: above
+ settings:
+ link: true
+ third_party_settings: { }
+ weight: 3
+ region: content
field_title:
type: string
label: hidden
@@ -48,6 +58,7 @@ hidden:
field_country: true
field_document_type: true
field_hide_from_navigation: true
+ field_month: true
field_short_title: true
field_tags: true
field_year: true
diff --git a/config/core.entity_view_display.paragraph.document_chapter.preview.yml b/config/core.entity_view_display.paragraph.document_chapter.preview.yml
index 380225b4..e1fd5cbb 100644
--- a/config/core.entity_view_display.paragraph.document_chapter.preview.yml
+++ b/config/core.entity_view_display.paragraph.document_chapter.preview.yml
@@ -9,9 +9,11 @@ dependencies:
- field.field.paragraph.document_chapter.field_country
- field.field.paragraph.document_chapter.field_document_type
- field.field.paragraph.document_chapter.field_hide_from_navigation
+ - field.field.paragraph.document_chapter.field_month
- field.field.paragraph.document_chapter.field_short_title
- field.field.paragraph.document_chapter.field_summary
- field.field.paragraph.document_chapter.field_tags
+ - field.field.paragraph.document_chapter.field_theme
- field.field.paragraph.document_chapter.field_title
- field.field.paragraph.document_chapter.field_year
- paragraphs.paragraphs_type.document_chapter
@@ -51,7 +53,9 @@ hidden:
field_country: true
field_document_type: true
field_hide_from_navigation: true
+ field_month: true
field_short_title: true
field_summary: true
field_tags: true
+ field_theme: true
field_year: true
diff --git a/config/core.entity_view_display.taxonomy_term.content_space.default.yml b/config/core.entity_view_display.taxonomy_term.content_space.default.yml
index 2bef875e..e0a15723 100755
--- a/config/core.entity_view_display.taxonomy_term.content_space.default.yml
+++ b/config/core.entity_view_display.taxonomy_term.content_space.default.yml
@@ -3,10 +3,12 @@ langcode: en
status: true
dependencies:
config:
+ - field.field.taxonomy_term.content_space.field_computed_tags
+ - field.field.taxonomy_term.content_space.field_country
- field.field.taxonomy_term.content_space.field_major_tags
- taxonomy.vocabulary.content_space
module:
- - ncms_ui
+ - computed_field
- text
id: taxonomy_term.content_space.default
targetEntityType: taxonomy_term
@@ -20,13 +22,17 @@ content:
third_party_settings: { }
weight: 0
region: content
- field_major_tags:
- type: entity_reference_label_inline
+ field_computed_tags:
+ type: computed_string
label: inline
settings:
- link: 0
+ sanitized: true
+ cache_unit: -1
+ cache_duration: 1
third_party_settings: { }
weight: 1
region: content
hidden:
+ field_country: true
+ field_major_tags: true
langcode: true
diff --git a/config/core.extension.yml b/config/core.extension.yml
index c83fd673..7af85911 100755
--- a/config/core.extension.yml
+++ b/config/core.extension.yml
@@ -103,6 +103,8 @@ module:
syslog: 0
system: 0
taxonomy: 0
+ taxonomy_max_depth: 0
+ taxonomy_term_depth: 0
text: 0
token: 0
toolbar: 0
diff --git a/config/field.field.node.article.field_document_type.yml b/config/field.field.node.article.field_document_type.yml
index 052e2050..5e589513 100644
--- a/config/field.field.node.article.field_document_type.yml
+++ b/config/field.field.node.article.field_document_type.yml
@@ -10,7 +10,7 @@ dependencies:
- field_config_cardinality
third_party_settings:
field_config_cardinality:
- cardinality_config: '1'
+ cardinality_config: '-1'
cardinality_label_config: false
unlimited_not_required: ''
limited_not_required: ''
diff --git a/config/field.field.node.article.field_month.yml b/config/field.field.node.article.field_month.yml
new file mode 100644
index 00000000..ed3e622a
--- /dev/null
+++ b/config/field.field.node.article.field_month.yml
@@ -0,0 +1,38 @@
+uuid: 1d2ad5e6-9023-4489-a053-430e9b83b818
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.field_month
+ - node.type.article
+ - taxonomy.vocabulary.month
+ module:
+ - field_config_cardinality
+third_party_settings:
+ field_config_cardinality:
+ cardinality_config: '-1'
+ cardinality_label_config: false
+ unlimited_not_required: ''
+ limited_not_required: ''
+ limited_required: ''
+id: node.article.field_month
+field_name: field_month
+entity_type: node
+bundle: article
+label: Month
+description: 'Select the month for this article.'
+required: false
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings:
+ handler: 'default:taxonomy_term'
+ handler_settings:
+ target_bundles:
+ month: month
+ sort:
+ field: name
+ direction: asc
+ auto_create: false
+ auto_create_bundle: ''
+field_type: entity_reference
diff --git a/config/field.field.node.article.field_theme.yml b/config/field.field.node.article.field_theme.yml
new file mode 100644
index 00000000..0ded029b
--- /dev/null
+++ b/config/field.field.node.article.field_theme.yml
@@ -0,0 +1,34 @@
+uuid: c964ef9c-8250-4fad-a0a1-b697fd18cf4f
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.field_theme
+ - node.type.article
+ module:
+ - field_config_cardinality
+third_party_settings:
+ field_config_cardinality:
+ cardinality_config: '1'
+ cardinality_label_config: false
+ unlimited_not_required: ''
+ limited_not_required: ''
+ limited_required: ''
+id: node.article.field_theme
+field_name: field_theme
+entity_type: node
+bundle: article
+label: Theme
+description: 'Add tags that describe the theme of this article.'
+required: false
+translatable: true
+default_value: { }
+default_value_callback: ''
+settings:
+ handler: views
+ handler_settings:
+ view:
+ view_name: theme_selection
+ display_name: entity_reference_1
+ arguments: { }
+field_type: entity_reference
diff --git a/config/field.field.node.document.field_country.yml b/config/field.field.node.document.field_country.yml
index d1d6b6b1..e80ad518 100644
--- a/config/field.field.node.document.field_country.yml
+++ b/config/field.field.node.document.field_country.yml
@@ -10,7 +10,7 @@ dependencies:
- field_config_cardinality
third_party_settings:
field_config_cardinality:
- cardinality_config: '1'
+ cardinality_config: '-1'
cardinality_label_config: false
unlimited_not_required: ''
limited_not_required: ''
diff --git a/config/field.field.node.document.field_document_type.yml b/config/field.field.node.document.field_document_type.yml
index 5b4aacdb..d5253a43 100644
--- a/config/field.field.node.document.field_document_type.yml
+++ b/config/field.field.node.document.field_document_type.yml
@@ -10,7 +10,7 @@ dependencies:
- field_config_cardinality
third_party_settings:
field_config_cardinality:
- cardinality_config: '1'
+ cardinality_config: '-1'
cardinality_label_config: false
unlimited_not_required: ''
limited_not_required: ''
diff --git a/config/field.field.node.document.field_month.yml b/config/field.field.node.document.field_month.yml
new file mode 100644
index 00000000..ecaea77b
--- /dev/null
+++ b/config/field.field.node.document.field_month.yml
@@ -0,0 +1,38 @@
+uuid: efd7a75b-7068-409d-b865-b3f29dffcc78
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.field_month
+ - node.type.document
+ - taxonomy.vocabulary.month
+ module:
+ - field_config_cardinality
+third_party_settings:
+ field_config_cardinality:
+ cardinality_config: '-1'
+ cardinality_label_config: false
+ unlimited_not_required: ''
+ limited_not_required: ''
+ limited_required: ''
+id: node.document.field_month
+field_name: field_month
+entity_type: node
+bundle: document
+label: Month
+description: 'Select the month for this document.'
+required: false
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings:
+ handler: 'default:taxonomy_term'
+ handler_settings:
+ target_bundles:
+ month: month
+ sort:
+ field: name
+ direction: asc
+ auto_create: false
+ auto_create_bundle: ''
+field_type: entity_reference
diff --git a/config/field.field.node.document.field_theme.yml b/config/field.field.node.document.field_theme.yml
new file mode 100644
index 00000000..9856c2c0
--- /dev/null
+++ b/config/field.field.node.document.field_theme.yml
@@ -0,0 +1,34 @@
+uuid: b2375b94-3b78-4d6d-b144-5b9f07adf5a8
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.node.field_theme
+ - node.type.document
+ module:
+ - field_config_cardinality
+third_party_settings:
+ field_config_cardinality:
+ cardinality_config: '-1'
+ cardinality_label_config: false
+ unlimited_not_required: ''
+ limited_not_required: ''
+ limited_required: ''
+id: node.document.field_theme
+field_name: field_theme
+entity_type: node
+bundle: document
+label: Theme
+description: 'Add tags that describe the theme of this document and all articles within it.'
+required: false
+translatable: true
+default_value: { }
+default_value_callback: ''
+settings:
+ handler: views
+ handler_settings:
+ view:
+ view_name: theme_selection
+ display_name: entity_reference_1
+ arguments: { }
+field_type: entity_reference
diff --git a/config/field.field.paragraph.document_chapter.field_document_type.yml b/config/field.field.paragraph.document_chapter.field_document_type.yml
index 9d91f566..e5859c8f 100644
--- a/config/field.field.paragraph.document_chapter.field_document_type.yml
+++ b/config/field.field.paragraph.document_chapter.field_document_type.yml
@@ -10,7 +10,7 @@ dependencies:
- field_config_cardinality
third_party_settings:
field_config_cardinality:
- cardinality_config: '1'
+ cardinality_config: '-1'
cardinality_label_config: false
unlimited_not_required: ''
limited_not_required: ''
diff --git a/config/field.field.paragraph.document_chapter.field_month.yml b/config/field.field.paragraph.document_chapter.field_month.yml
new file mode 100644
index 00000000..da7e2ac0
--- /dev/null
+++ b/config/field.field.paragraph.document_chapter.field_month.yml
@@ -0,0 +1,38 @@
+uuid: 01bda68f-6670-4544-9652-e75e8f63695c
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.paragraph.field_month
+ - paragraphs.paragraphs_type.document_chapter
+ - taxonomy.vocabulary.month
+ module:
+ - field_config_cardinality
+third_party_settings:
+ field_config_cardinality:
+ cardinality_config: '-1'
+ cardinality_label_config: false
+ unlimited_not_required: ''
+ limited_not_required: ''
+ limited_required: ''
+id: paragraph.document_chapter.field_month
+field_name: field_month
+entity_type: paragraph
+bundle: document_chapter
+label: Month
+description: 'Select the month for this chapter.'
+required: false
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings:
+ handler: 'default:taxonomy_term'
+ handler_settings:
+ target_bundles:
+ month: month
+ sort:
+ field: name
+ direction: asc
+ auto_create: false
+ auto_create_bundle: ''
+field_type: entity_reference
diff --git a/config/field.field.paragraph.document_chapter.field_theme.yml b/config/field.field.paragraph.document_chapter.field_theme.yml
new file mode 100644
index 00000000..4c5650f9
--- /dev/null
+++ b/config/field.field.paragraph.document_chapter.field_theme.yml
@@ -0,0 +1,34 @@
+uuid: 6edcb3ff-7ccb-4a39-99c0-62009a230212
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.paragraph.field_theme
+ - paragraphs.paragraphs_type.document_chapter
+ module:
+ - field_config_cardinality
+third_party_settings:
+ field_config_cardinality:
+ cardinality_config: '1'
+ cardinality_label_config: false
+ unlimited_not_required: ''
+ limited_not_required: ''
+ limited_required: ''
+id: paragraph.document_chapter.field_theme
+field_name: field_theme
+entity_type: paragraph
+bundle: document_chapter
+label: Theme
+description: 'Add tags that apply to this chapter and all articles within it.'
+required: false
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings:
+ handler: views
+ handler_settings:
+ view:
+ view_name: theme_selection
+ display_name: entity_reference_1
+ arguments: { }
+field_type: entity_reference
diff --git a/config/field.field.taxonomy_term.content_space.field_computed_tags.yml b/config/field.field.taxonomy_term.content_space.field_computed_tags.yml
new file mode 100644
index 00000000..8d3aa0fe
--- /dev/null
+++ b/config/field.field.taxonomy_term.content_space.field_computed_tags.yml
@@ -0,0 +1,29 @@
+uuid: 15c6d13b-0832-448d-a76f-ccbe3cc98180
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.taxonomy_term.field_computed_tags
+ - taxonomy.vocabulary.content_space
+ module:
+ - computed_field
+ - field_config_cardinality
+third_party_settings:
+ field_config_cardinality:
+ cardinality_config: '1'
+ cardinality_label_config: false
+ unlimited_not_required: ''
+ limited_not_required: ''
+ limited_required: ''
+id: taxonomy_term.content_space.field_computed_tags
+field_name: field_computed_tags
+entity_type: taxonomy_term
+bundle: content_space
+label: 'Computed Tags'
+description: ''
+required: false
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings: { }
+field_type: computed_string
diff --git a/config/field.field.taxonomy_term.content_space.field_country.yml b/config/field.field.taxonomy_term.content_space.field_country.yml
new file mode 100644
index 00000000..d5c1715b
--- /dev/null
+++ b/config/field.field.taxonomy_term.content_space.field_country.yml
@@ -0,0 +1,38 @@
+uuid: a718b71f-3549-4e2d-b99f-f5eb2164279c
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.taxonomy_term.field_country
+ - taxonomy.vocabulary.content_space
+ - taxonomy.vocabulary.country
+ module:
+ - field_config_cardinality
+third_party_settings:
+ field_config_cardinality:
+ cardinality_config: '-1'
+ cardinality_label_config: false
+ unlimited_not_required: ''
+ limited_not_required: ''
+ limited_required: ''
+id: taxonomy_term.content_space.field_country
+field_name: field_country
+entity_type: taxonomy_term
+bundle: content_space
+label: Country
+description: 'Select the country for this content space.'
+required: false
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings:
+ handler: 'default:taxonomy_term'
+ handler_settings:
+ target_bundles:
+ country: country
+ sort:
+ field: name
+ direction: asc
+ auto_create: false
+ auto_create_bundle: ''
+field_type: entity_reference
diff --git a/config/field.storage.node.field_computed_tags.yml b/config/field.storage.node.field_computed_tags.yml
index 8d1e2ca4..50b2edfd 100644
--- a/config/field.storage.node.field_computed_tags.yml
+++ b/config/field.storage.node.field_computed_tags.yml
@@ -10,7 +10,7 @@ field_name: field_computed_tags
entity_type: node
type: computed_string
settings:
- max_length: '255'
+ max_length: '1024'
is_ascii: false
case_sensitive: false
module: computed_field
diff --git a/config/field.storage.node.field_document_type.yml b/config/field.storage.node.field_document_type.yml
index 6eeb448f..5fb01ed6 100644
--- a/config/field.storage.node.field_document_type.yml
+++ b/config/field.storage.node.field_document_type.yml
@@ -13,7 +13,7 @@ settings:
target_type: taxonomy_term
module: core
locked: false
-cardinality: 1
+cardinality: -1
translatable: true
indexes: { }
persist_with_no_fields: false
diff --git a/config/field.storage.node.field_month.yml b/config/field.storage.node.field_month.yml
new file mode 100644
index 00000000..d9fb02b7
--- /dev/null
+++ b/config/field.storage.node.field_month.yml
@@ -0,0 +1,20 @@
+uuid: c2ce191f-9e42-49e8-8c7e-ab00d5937352
+langcode: en
+status: true
+dependencies:
+ module:
+ - node
+ - taxonomy
+id: node.field_month
+field_name: field_month
+entity_type: node
+type: entity_reference
+settings:
+ target_type: taxonomy_term
+module: core
+locked: false
+cardinality: -1
+translatable: true
+indexes: { }
+persist_with_no_fields: false
+custom_storage: false
diff --git a/config/field.storage.node.field_theme.yml b/config/field.storage.node.field_theme.yml
new file mode 100644
index 00000000..504dafdb
--- /dev/null
+++ b/config/field.storage.node.field_theme.yml
@@ -0,0 +1,20 @@
+uuid: 2f0dac8a-b277-4743-ad0d-c5eceb404a8a
+langcode: en
+status: true
+dependencies:
+ module:
+ - node
+ - taxonomy
+id: node.field_theme
+field_name: field_theme
+entity_type: node
+type: entity_reference
+settings:
+ target_type: taxonomy_term
+module: core
+locked: false
+cardinality: -1
+translatable: true
+indexes: { }
+persist_with_no_fields: false
+custom_storage: false
diff --git a/config/field.storage.paragraph.field_document_type.yml b/config/field.storage.paragraph.field_document_type.yml
index c623751f..ef9d539d 100644
--- a/config/field.storage.paragraph.field_document_type.yml
+++ b/config/field.storage.paragraph.field_document_type.yml
@@ -13,7 +13,7 @@ settings:
target_type: taxonomy_term
module: core
locked: false
-cardinality: 1
+cardinality: -1
translatable: true
indexes: { }
persist_with_no_fields: false
diff --git a/config/field.storage.paragraph.field_month.yml b/config/field.storage.paragraph.field_month.yml
new file mode 100644
index 00000000..e28da046
--- /dev/null
+++ b/config/field.storage.paragraph.field_month.yml
@@ -0,0 +1,20 @@
+uuid: 9b7c5a6c-a7a8-4a17-a34f-89d10435aba5
+langcode: en
+status: true
+dependencies:
+ module:
+ - paragraphs
+ - taxonomy
+id: paragraph.field_month
+field_name: field_month
+entity_type: paragraph
+type: entity_reference
+settings:
+ target_type: taxonomy_term
+module: core
+locked: false
+cardinality: -1
+translatable: true
+indexes: { }
+persist_with_no_fields: false
+custom_storage: false
diff --git a/config/field.storage.paragraph.field_theme.yml b/config/field.storage.paragraph.field_theme.yml
new file mode 100644
index 00000000..481d647a
--- /dev/null
+++ b/config/field.storage.paragraph.field_theme.yml
@@ -0,0 +1,20 @@
+uuid: 69a5208d-9f55-4a64-8c85-d9b08778fe06
+langcode: en
+status: true
+dependencies:
+ module:
+ - paragraphs
+ - taxonomy
+id: paragraph.field_theme
+field_name: field_theme
+entity_type: paragraph
+type: entity_reference
+settings:
+ target_type: taxonomy_term
+module: core
+locked: false
+cardinality: -1
+translatable: true
+indexes: { }
+persist_with_no_fields: false
+custom_storage: false
diff --git a/config/field.storage.taxonomy_term.field_computed_tags.yml b/config/field.storage.taxonomy_term.field_computed_tags.yml
new file mode 100644
index 00000000..a7fc4045
--- /dev/null
+++ b/config/field.storage.taxonomy_term.field_computed_tags.yml
@@ -0,0 +1,22 @@
+uuid: d1f2682f-d4b7-487b-ad84-51c4691cae94
+langcode: en
+status: true
+dependencies:
+ module:
+ - computed_field
+ - taxonomy
+id: taxonomy_term.field_computed_tags
+field_name: field_computed_tags
+entity_type: taxonomy_term
+type: computed_string
+settings:
+ max_length: '255'
+ is_ascii: false
+ case_sensitive: false
+module: computed_field
+locked: false
+cardinality: 1
+translatable: true
+indexes: { }
+persist_with_no_fields: false
+custom_storage: false
diff --git a/config/field.storage.taxonomy_term.field_country.yml b/config/field.storage.taxonomy_term.field_country.yml
new file mode 100644
index 00000000..af2d0461
--- /dev/null
+++ b/config/field.storage.taxonomy_term.field_country.yml
@@ -0,0 +1,19 @@
+uuid: 7a489673-07c3-4063-9396-4d272a67d211
+langcode: en
+status: true
+dependencies:
+ module:
+ - taxonomy
+id: taxonomy_term.field_country
+field_name: field_country
+entity_type: taxonomy_term
+type: entity_reference
+settings:
+ target_type: taxonomy_term
+module: core
+locked: false
+cardinality: -1
+translatable: true
+indexes: { }
+persist_with_no_fields: false
+custom_storage: false
diff --git a/config/language.content_settings.taxonomy_term.month.yml b/config/language.content_settings.taxonomy_term.month.yml
new file mode 100644
index 00000000..7a7fe3fe
--- /dev/null
+++ b/config/language.content_settings.taxonomy_term.month.yml
@@ -0,0 +1,11 @@
+uuid: 6093aec1-8f67-47c1-9a85-db42db192417
+langcode: en
+status: true
+dependencies:
+ config:
+ - taxonomy.vocabulary.month
+id: taxonomy_term.month
+target_entity_type_id: taxonomy_term
+target_bundle: month
+default_langcode: site_default
+language_alterable: false
diff --git a/config/language.content_settings.taxonomy_term.theme.yml b/config/language.content_settings.taxonomy_term.theme.yml
new file mode 100644
index 00000000..36914312
--- /dev/null
+++ b/config/language.content_settings.taxonomy_term.theme.yml
@@ -0,0 +1,16 @@
+uuid: ab75daae-0e84-424b-ad9c-8c39a4f1e253
+langcode: en
+status: true
+dependencies:
+ config:
+ - taxonomy.vocabulary.theme
+ module:
+ - content_translation
+third_party_settings:
+ content_translation:
+ enabled: true
+id: taxonomy_term.theme
+target_entity_type_id: taxonomy_term
+target_bundle: theme
+default_langcode: site_default
+language_alterable: true
diff --git a/config/language/es/admin_dialogs.admin_dialog.pathauto.yml b/config/language/es/admin_dialogs.admin_dialog.pathauto.yml
new file mode 100644
index 00000000..3cb91e6f
--- /dev/null
+++ b/config/language/es/admin_dialogs.admin_dialog.pathauto.yml
@@ -0,0 +1 @@
+label: Pathauto
diff --git a/config/language/es/admin_dialogs.admin_dialog_group.contrib_modules.yml b/config/language/es/admin_dialogs.admin_dialog_group.contrib_modules.yml
new file mode 100644
index 00000000..fed05842
--- /dev/null
+++ b/config/language/es/admin_dialogs.admin_dialog_group.contrib_modules.yml
@@ -0,0 +1 @@
+label: 'Contrib modules'
diff --git a/config/language/es/image.style.media_library.yml b/config/language/es/image.style.media_library.yml
new file mode 100644
index 00000000..3fb769bf
--- /dev/null
+++ b/config/language/es/image.style.media_library.yml
@@ -0,0 +1 @@
+label: 'Media Library thumbnail (220×220)'
diff --git a/config/language/es/metatag.metatag_defaults.403.yml b/config/language/es/metatag.metatag_defaults.403.yml
index db93f336..083b15f1 100755
--- a/config/language/es/metatag.metatag_defaults.403.yml
+++ b/config/language/es/metatag.metatag_defaults.403.yml
@@ -1 +1,4 @@
label: '403 acceso denegado'
+tags:
+ canonical_url: '[site:url]'
+ shortlink: '[site:url]'
diff --git a/config/language/es/metatag.metatag_defaults.404.yml b/config/language/es/metatag.metatag_defaults.404.yml
index 94bd5ec9..e13ea0dd 100755
--- a/config/language/es/metatag.metatag_defaults.404.yml
+++ b/config/language/es/metatag.metatag_defaults.404.yml
@@ -1 +1,4 @@
label: '404 página no encontrada'
+tags:
+ canonical_url: '[site:url]'
+ shortlink: '[site:url]'
diff --git a/config/language/es/metatag.metatag_defaults.front.yml b/config/language/es/metatag.metatag_defaults.front.yml
index 60f1d0bb..498004a1 100755
--- a/config/language/es/metatag.metatag_defaults.front.yml
+++ b/config/language/es/metatag.metatag_defaults.front.yml
@@ -1 +1,4 @@
label: 'Página de Inicio'
+tags:
+ canonical_url: '[site:url]'
+ shortlink: '[site:url]'
diff --git a/config/language/es/metatag.metatag_defaults.global.yml b/config/language/es/metatag.metatag_defaults.global.yml
index 85a1911f..e7ad00f8 100755
--- a/config/language/es/metatag.metatag_defaults.global.yml
+++ b/config/language/es/metatag.metatag_defaults.global.yml
@@ -1 +1,4 @@
label: Global
+tags:
+ canonical_url: '[current-page:url]'
+ title: '[current-page:title] | [site:name]'
diff --git a/config/language/es/metatag.metatag_defaults.node.yml b/config/language/es/metatag.metatag_defaults.node.yml
index 5fe60abc..c6b5e38f 100755
--- a/config/language/es/metatag.metatag_defaults.node.yml
+++ b/config/language/es/metatag.metatag_defaults.node.yml
@@ -1 +1,5 @@
label: Content
+tags:
+ title: '[node:title] | [site:name]'
+ description: '[node:summary]'
+ canonical_url: '[node:url]'
diff --git a/config/language/es/metatag.metatag_defaults.taxonomy_term.yml b/config/language/es/metatag.metatag_defaults.taxonomy_term.yml
index 3335d358..051280d0 100755
--- a/config/language/es/metatag.metatag_defaults.taxonomy_term.yml
+++ b/config/language/es/metatag.metatag_defaults.taxonomy_term.yml
@@ -1 +1,5 @@
label: 'Término de taxonomía'
+tags:
+ canonical_url: '[term:url]'
+ description: '[term:description]'
+ title: '[term:name] | [site:name]'
diff --git a/config/language/es/metatag.metatag_defaults.user.yml b/config/language/es/metatag.metatag_defaults.user.yml
index f5d71ece..21da9973 100755
--- a/config/language/es/metatag.metatag_defaults.user.yml
+++ b/config/language/es/metatag.metatag_defaults.user.yml
@@ -1 +1,5 @@
label: Usuario
+tags:
+ canonical_url: '[user:url]'
+ description: '[site:name]'
+ title: '[user:display-name] | [site:name]'
diff --git a/config/language/es/views.view.files.yml b/config/language/es/views.view.files.yml
index 5e62197e..ebf02531 100755
--- a/config/language/es/views.view.files.yml
+++ b/config/language/es/views.view.files.yml
@@ -26,6 +26,8 @@ display:
label: 'Changed date'
count:
label: 'Used in'
+ alter:
+ path: 'admin/content/files/usage/{{ fid }}'
format_plural_string: !!binary MSBsdWdhcgNAY291bnQgbHVnYXJlcw==
pager:
options:
@@ -74,6 +76,7 @@ display:
label: 'Registering module'
count:
label: 'Use count'
+ format_plural_string: !!binary MQNAY291bnQ=
pager:
options:
tags:
diff --git a/config/language/es/views.view.media_library.yml b/config/language/es/views.view.media_library.yml
index d0e33b26..083ab91f 100755
--- a/config/language/es/views.view.media_library.yml
+++ b/config/language/es/views.view.media_library.yml
@@ -94,6 +94,7 @@ display:
display_link_table:
label: Table
widget_table:
+ display_title: 'Widget (table)'
display_options:
fields:
thumbnail__target_id:
diff --git a/config/language/es/views.view.redirect.yml b/config/language/es/views.view.redirect.yml
index e5ca5b09..67cb3ee5 100755
--- a/config/language/es/views.view.redirect.yml
+++ b/config/language/es/views.view.redirect.yml
@@ -1,3 +1,5 @@
+label: Redirect
+description: 'List of redirects'
display:
default:
display_title: Máster
@@ -21,6 +23,8 @@ display:
items_per_page_options_all_label: '- All -'
offset_label: Offset
fields:
+ redirect_bulk_form:
+ action_title: 'With selection'
redirect_source__path:
label: From
separator: ', '
@@ -33,8 +37,32 @@ display:
redirect_redirect__uri:
expose:
label: To
+ status_code:
+ expose:
+ label: 'Status code'
+ group_info:
+ label: 'Status code'
+ group_items:
+ 1:
+ title: '300 Multiple Choices'
+ 2:
+ title: '301 Moved Permanently'
+ 3:
+ title: '302 Found'
+ 4:
+ title: '303 See Other'
+ 5:
+ title: '304 Not Modified'
+ 6:
+ title: '305 Use Proxy'
+ 7:
+ title: '307 Temporary Redirect'
language:
expose:
label: 'Original language'
+ title: Redirect
+ empty:
+ area_text_custom:
+ content: 'There is no redirect yet.'
page_1:
display_title: Page
diff --git a/config/language/es/views.view.user_admin_people.yml b/config/language/es/views.view.user_admin_people.yml
index 3c8d8082..d2153170 100755
--- a/config/language/es/views.view.user_admin_people.yml
+++ b/config/language/es/views.view.user_admin_people.yml
@@ -19,8 +19,14 @@ display:
label: Roles
created:
label: 'Member for'
+ settings:
+ future_format: '@interval'
+ past_format: '@interval'
access:
label: 'Last access'
+ settings:
+ future_format: '@interval hence'
+ past_format: '@interval ago'
operations:
label: Operations
mail:
diff --git a/config/language/fr/admin_dialogs.admin_dialog.pathauto.yml b/config/language/fr/admin_dialogs.admin_dialog.pathauto.yml
new file mode 100644
index 00000000..3cb91e6f
--- /dev/null
+++ b/config/language/fr/admin_dialogs.admin_dialog.pathauto.yml
@@ -0,0 +1 @@
+label: Pathauto
diff --git a/config/language/fr/admin_dialogs.admin_dialog.tasks.yml b/config/language/fr/admin_dialogs.admin_dialog.tasks.yml
new file mode 100644
index 00000000..7b33b769
--- /dev/null
+++ b/config/language/fr/admin_dialogs.admin_dialog.tasks.yml
@@ -0,0 +1 @@
+label: 'Local Tasks'
diff --git a/config/language/fr/admin_dialogs.admin_dialog_group.contrib_modules.yml b/config/language/fr/admin_dialogs.admin_dialog_group.contrib_modules.yml
new file mode 100644
index 00000000..fed05842
--- /dev/null
+++ b/config/language/fr/admin_dialogs.admin_dialog_group.contrib_modules.yml
@@ -0,0 +1 @@
+label: 'Contrib modules'
diff --git a/config/language/fr/block.block.claro_secondary_local_tasks.yml b/config/language/fr/block.block.claro_secondary_local_tasks.yml
new file mode 100644
index 00000000..1f57e5e4
--- /dev/null
+++ b/config/language/fr/block.block.claro_secondary_local_tasks.yml
@@ -0,0 +1,2 @@
+settings:
+ label: 'Secondary tabs'
diff --git a/config/language/fr/block.block.gin_secondary_local_tasks.yml b/config/language/fr/block.block.gin_secondary_local_tasks.yml
new file mode 100644
index 00000000..1f57e5e4
--- /dev/null
+++ b/config/language/fr/block.block.gin_secondary_local_tasks.yml
@@ -0,0 +1,2 @@
+settings:
+ label: 'Secondary tabs'
diff --git a/config/language/fr/metatag.metatag_defaults.403.yml b/config/language/fr/metatag.metatag_defaults.403.yml
index cc694af0..da2cf1c2 100755
--- a/config/language/fr/metatag.metatag_defaults.403.yml
+++ b/config/language/fr/metatag.metatag_defaults.403.yml
@@ -1 +1,4 @@
label: 'page 403 accès refusé'
+tags:
+ canonical_url: '[site:url]'
+ shortlink: '[site:url]'
diff --git a/config/language/fr/metatag.metatag_defaults.404.yml b/config/language/fr/metatag.metatag_defaults.404.yml
index bdd9e463..8da58a83 100755
--- a/config/language/fr/metatag.metatag_defaults.404.yml
+++ b/config/language/fr/metatag.metatag_defaults.404.yml
@@ -1 +1,4 @@
label: 'Page 404 non trouvée'
+tags:
+ canonical_url: '[site:url]'
+ shortlink: '[site:url]'
diff --git a/config/language/fr/metatag.metatag_defaults.front.yml b/config/language/fr/metatag.metatag_defaults.front.yml
index 8c5e80bd..9fd39f88 100755
--- a/config/language/fr/metatag.metatag_defaults.front.yml
+++ b/config/language/fr/metatag.metatag_defaults.front.yml
@@ -1 +1,4 @@
label: "Page d'accueil"
+tags:
+ canonical_url: '[site:url]'
+ shortlink: '[site:url]'
diff --git a/config/language/fr/metatag.metatag_defaults.global.yml b/config/language/fr/metatag.metatag_defaults.global.yml
index 85a1911f..e7ad00f8 100755
--- a/config/language/fr/metatag.metatag_defaults.global.yml
+++ b/config/language/fr/metatag.metatag_defaults.global.yml
@@ -1 +1,4 @@
label: Global
+tags:
+ canonical_url: '[current-page:url]'
+ title: '[current-page:title] | [site:name]'
diff --git a/config/language/fr/metatag.metatag_defaults.node.yml b/config/language/fr/metatag.metatag_defaults.node.yml
index 5fe60abc..c6b5e38f 100755
--- a/config/language/fr/metatag.metatag_defaults.node.yml
+++ b/config/language/fr/metatag.metatag_defaults.node.yml
@@ -1 +1,5 @@
label: Content
+tags:
+ title: '[node:title] | [site:name]'
+ description: '[node:summary]'
+ canonical_url: '[node:url]'
diff --git a/config/language/fr/metatag.metatag_defaults.taxonomy_term.yml b/config/language/fr/metatag.metatag_defaults.taxonomy_term.yml
index f01ad6d1..0bda4107 100755
--- a/config/language/fr/metatag.metatag_defaults.taxonomy_term.yml
+++ b/config/language/fr/metatag.metatag_defaults.taxonomy_term.yml
@@ -1 +1,5 @@
label: 'Terme de taxonomie'
+tags:
+ canonical_url: '[term:url]'
+ description: '[term:description]'
+ title: '[term:name] | [site:name]'
diff --git a/config/language/fr/metatag.metatag_defaults.user.yml b/config/language/fr/metatag.metatag_defaults.user.yml
index 8a9fc54b..372e03b2 100755
--- a/config/language/fr/metatag.metatag_defaults.user.yml
+++ b/config/language/fr/metatag.metatag_defaults.user.yml
@@ -1 +1,5 @@
label: Utilisateur
+tags:
+ canonical_url: '[user:url]'
+ description: '[site:name]'
+ title: '[user:display-name] | [site:name]'
diff --git a/config/language/fr/views.view.files.yml b/config/language/fr/views.view.files.yml
index b24bb7d5..4cd95071 100755
--- a/config/language/fr/views.view.files.yml
+++ b/config/language/fr/views.view.files.yml
@@ -26,6 +26,8 @@ display:
label: 'Changed date'
count:
label: 'Used in'
+ alter:
+ path: 'admin/content/files/usage/{{ fid }}'
format_plural_string: !!binary QGNvdW50IGVtcGxhY2VtZW50A0Bjb3VudCBlbXBsYWNlbWVudHM=
pager:
options:
@@ -74,6 +76,7 @@ display:
label: 'Registering module'
count:
label: 'Use count'
+ format_plural_string: !!binary MQNAY291bnQ=
pager:
options:
tags:
diff --git a/config/language/fr/views.view.redirect.yml b/config/language/fr/views.view.redirect.yml
index 229660a6..cb852870 100755
--- a/config/language/fr/views.view.redirect.yml
+++ b/config/language/fr/views.view.redirect.yml
@@ -1,3 +1,5 @@
+label: Redirect
+description: 'List of redirects'
display:
default:
display_title: Maître
@@ -21,6 +23,8 @@ display:
items_per_page_options_all_label: '- All -'
offset_label: Offset
fields:
+ redirect_bulk_form:
+ action_title: 'With selection'
redirect_source__path:
label: From
separator: ', '
@@ -33,8 +37,32 @@ display:
redirect_redirect__uri:
expose:
label: To
+ status_code:
+ expose:
+ label: 'Status code'
+ group_info:
+ label: 'Status code'
+ group_items:
+ 1:
+ title: '300 Multiple Choices'
+ 2:
+ title: '301 Moved Permanently'
+ 3:
+ title: '302 Found'
+ 4:
+ title: '303 See Other'
+ 5:
+ title: '304 Not Modified'
+ 6:
+ title: '305 Use Proxy'
+ 7:
+ title: '307 Temporary Redirect'
language:
expose:
label: 'Original language'
+ title: Redirect
+ empty:
+ area_text_custom:
+ content: 'There is no redirect yet.'
page_1:
display_title: Page
diff --git a/config/language/fr/views.view.user_admin_people.yml b/config/language/fr/views.view.user_admin_people.yml
index 3c8d8082..d2153170 100755
--- a/config/language/fr/views.view.user_admin_people.yml
+++ b/config/language/fr/views.view.user_admin_people.yml
@@ -19,8 +19,14 @@ display:
label: Roles
created:
label: 'Member for'
+ settings:
+ future_format: '@interval'
+ past_format: '@interval'
access:
label: 'Last access'
+ settings:
+ future_format: '@interval hence'
+ past_format: '@interval ago'
operations:
label: Operations
mail:
diff --git a/config/taxonomy.vocabulary.country.yml b/config/taxonomy.vocabulary.country.yml
index 76c04e49..95b4121f 100644
--- a/config/taxonomy.vocabulary.country.yml
+++ b/config/taxonomy.vocabulary.country.yml
@@ -1,7 +1,12 @@
uuid: 67fbeaa2-803b-4949-9f51-4074a4ff28e1
langcode: en
status: true
-dependencies: { }
+dependencies:
+ module:
+ - taxonomy_max_depth
+third_party_settings:
+ taxonomy_max_depth:
+ max_depth: 0
name: Country
vid: country
description: 'The countries that a content item is about'
diff --git a/config/taxonomy.vocabulary.document_type.yml b/config/taxonomy.vocabulary.document_type.yml
index 2c79306d..6bda52f6 100644
--- a/config/taxonomy.vocabulary.document_type.yml
+++ b/config/taxonomy.vocabulary.document_type.yml
@@ -1,7 +1,12 @@
uuid: 2d9ffc8f-5bc2-46fb-85c2-b93bfb7fb4ed
langcode: en
status: true
-dependencies: { }
+dependencies:
+ module:
+ - taxonomy_max_depth
+third_party_settings:
+ taxonomy_max_depth:
+ max_depth: 0
name: 'Document type'
vid: document_type
description: 'The type of document'
diff --git a/config/taxonomy.vocabulary.major_tags.yml b/config/taxonomy.vocabulary.major_tags.yml
index 7e9ba6c4..ab0ee4dc 100755
--- a/config/taxonomy.vocabulary.major_tags.yml
+++ b/config/taxonomy.vocabulary.major_tags.yml
@@ -2,8 +2,8 @@ uuid: 90adcf85-47c7-4d3c-8d4a-fd3986ee0a2a
langcode: en
status: true
dependencies: { }
-name: Theme
+name: 'Deprecated - Theme'
vid: major_tags
-description: 'The main theme(s) of the content'
+description: 'Deprecated - The main theme(s) of the content'
weight: 0
new_revision: false
diff --git a/config/taxonomy.vocabulary.month.yml b/config/taxonomy.vocabulary.month.yml
new file mode 100644
index 00000000..6a4a2192
--- /dev/null
+++ b/config/taxonomy.vocabulary.month.yml
@@ -0,0 +1,14 @@
+uuid: da7964f1-a383-41f5-be86-3da9fb51ca0f
+langcode: en
+status: true
+dependencies:
+ module:
+ - taxonomy_max_depth
+third_party_settings:
+ taxonomy_max_depth:
+ max_depth: 0
+name: Month
+vid: month
+description: 'The month(s) that a content item is about'
+weight: 0
+new_revision: false
diff --git a/config/taxonomy.vocabulary.theme.yml b/config/taxonomy.vocabulary.theme.yml
new file mode 100644
index 00000000..3b10d75e
--- /dev/null
+++ b/config/taxonomy.vocabulary.theme.yml
@@ -0,0 +1,14 @@
+uuid: efb4aa66-7232-4688-bb07-b2a451a0ab04
+langcode: en
+status: true
+dependencies:
+ module:
+ - taxonomy_max_depth
+third_party_settings:
+ taxonomy_max_depth:
+ max_depth: 1
+name: Theme
+vid: theme
+description: 'The main theme(s) of the content'
+weight: 0
+new_revision: false
diff --git a/config/taxonomy.vocabulary.year.yml b/config/taxonomy.vocabulary.year.yml
index e499b51b..44b234c9 100644
--- a/config/taxonomy.vocabulary.year.yml
+++ b/config/taxonomy.vocabulary.year.yml
@@ -1,7 +1,12 @@
uuid: 8fd1b754-668f-4b20-af33-e813116f108c
langcode: en
status: true
-dependencies: { }
+dependencies:
+ module:
+ - taxonomy_max_depth
+third_party_settings:
+ taxonomy_max_depth:
+ max_depth: 0
name: Year
vid: year
description: 'The year(s) that a content item is about'
diff --git a/config/views.view.content.yml b/config/views.view.content.yml
index 67e1154d..714ec7f5 100755
--- a/config/views.view.content.yml
+++ b/config/views.view.content.yml
@@ -6,7 +6,7 @@ dependencies:
- field.storage.node.field_content_space
- field.storage.node.field_country
- field.storage.node.field_document_type
- - field.storage.node.field_tags
+ - field.storage.node.field_theme
- field.storage.node.field_type
- node.type.article
- node.type.document
@@ -15,12 +15,13 @@ dependencies:
- taxonomy.vocabulary.content_space
- taxonomy.vocabulary.country
- taxonomy.vocabulary.document_type
- - taxonomy.vocabulary.major_tags
- taxonomy.vocabulary.story_type
+ - taxonomy.vocabulary.theme
- workflows.workflow.article_workflow
module:
- content_moderation
- gho_fields
+ - ncms_tags
- ncms_ui
- node
- taxonomy
@@ -1003,11 +1004,13 @@ display:
vids:
country: country
document_type: document_type
- major_tags: major_tags
+ month: month
+ theme: theme
year: year
appeals: '0'
content_space: '0'
interactive_content_type: '0'
+ major_tags: '0'
story_type: '0'
article_document:
id: article_document
@@ -1337,29 +1340,30 @@ display:
hide_alter_empty: true
destination: false
filters:
- title:
- id: title
+ type:
+ id: type
table: node_field_data
- field: title
+ field: type
relationship: none
group_type: group
admin_label: ''
entity_type: node
- entity_field: title
- plugin_id: string
- operator: contains
- value: ''
+ entity_field: type
+ plugin_id: bundle
+ operator: in
+ value:
+ article: article
group: 1
- exposed: true
+ exposed: false
expose:
- operator_id: title_op
- label: Title
+ operator_id: type_op
+ label: 'Content type'
description: ''
use_operator: false
- operator: title_op
+ operator: type_op
operator_limit_selection: false
operator_list: { }
- identifier: title
+ identifier: type
required: false
remember: false
multiple: false
@@ -1367,6 +1371,7 @@ display:
authenticated: authenticated
anonymous: '0'
administrator: '0'
+ reduce: false
is_grouped: false
group_info:
label: ''
@@ -1379,35 +1384,39 @@ display:
default_group: All
default_group_multiple: { }
group_items: { }
- field_computed_tags_value:
- id: field_computed_tags_value
- table: node__field_computed_tags
- field: field_computed_tags_value
+ nid:
+ id: nid
+ table: node_field_data
+ field: nid
relationship: none
group_type: group
admin_label: ''
- plugin_id: string
- operator: contains
- value: ''
+ entity_type: node
+ entity_field: nid
+ plugin_id: numeric
+ operator: '!='
+ value:
+ min: ''
+ max: ''
+ value: '1'
group: 1
- exposed: true
+ exposed: false
expose:
- operator_id: field_computed_tags_value_op
- label: Tags
+ operator_id: ''
+ label: ''
description: ''
use_operator: false
- operator: field_computed_tags_value_op
+ operator: ''
operator_limit_selection: false
operator_list: { }
- identifier: tags
+ identifier: ''
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
- anonymous: '0'
- administrator: '0'
- editor: '0'
+ min_placeholder: ''
+ max_placeholder: ''
placeholder: ''
is_grouped: false
group_info:
@@ -1421,95 +1430,74 @@ display:
default_group: All
default_group_multiple: { }
group_items: { }
- moderation_state:
- id: moderation_state
+ default_langcode:
+ id: default_langcode
table: node_field_data
- field: moderation_state
+ field: default_langcode
relationship: none
group_type: group
admin_label: ''
entity_type: node
- plugin_id: moderation_state_filter
- operator: in
- value:
- all: all
- article_workflow-draft: article_workflow-draft
- article_workflow-published: article_workflow-published
- article_workflow-trash: article_workflow-trash
- article_workflow-unpublished: article_workflow-unpublished
+ entity_field: default_langcode
+ plugin_id: boolean
+ operator: '='
+ value: '1'
group: 1
- exposed: true
+ exposed: false
expose:
- operator_id: moderation_state_op
- label: Status
+ operator_id: ''
+ label: ''
description: ''
use_operator: false
- operator: moderation_state_op
+ operator: ''
operator_limit_selection: false
operator_list: { }
- identifier: status
+ identifier: ''
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
- anonymous: '0'
- administrator: '0'
- editor: '0'
- reduce: false
- is_grouped: true
+ is_grouped: false
group_info:
- label: Status
+ label: ''
description: ''
- identifier: moderation_state
+ identifier: ''
optional: true
widget: select
multiple: false
remember: false
default_group: All
default_group_multiple: { }
- group_items:
- 1:
- title: Published
- operator: in
- value:
- article_workflow-published: article_workflow-published
- 2:
- title: Draft
- operator: in
- value:
- article_workflow-draft: article_workflow-draft
- type:
- id: type
+ group_items: { }
+ moderation_state_1:
+ id: moderation_state_1
table: node_field_data
- field: type
+ field: moderation_state
relationship: none
group_type: group
admin_label: ''
entity_type: node
- entity_field: type
- plugin_id: bundle
- operator: in
+ plugin_id: moderation_state_filter
+ operator: 'not in'
value:
- article: article
+ article_workflow-trash: article_workflow-trash
group: 1
exposed: false
expose:
- operator_id: type_op
- label: 'Content type'
+ operator_id: ''
+ label: ''
description: ''
use_operator: false
- operator: type_op
+ operator: ''
operator_limit_selection: false
operator_list: { }
- identifier: type
+ identifier: ''
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
- anonymous: '0'
- administrator: '0'
reduce: false
is_grouped: false
group_info:
@@ -1523,40 +1511,36 @@ display:
default_group: All
default_group_multiple: { }
group_items: { }
- nid:
- id: nid
+ title:
+ id: title
table: node_field_data
- field: nid
+ field: title
relationship: none
group_type: group
admin_label: ''
entity_type: node
- entity_field: nid
- plugin_id: numeric
- operator: '!='
- value:
- min: ''
- max: ''
- value: '1'
+ entity_field: title
+ plugin_id: string
+ operator: contains
+ value: ''
group: 1
- exposed: false
+ exposed: true
expose:
- operator_id: ''
- label: ''
+ operator_id: title_op
+ label: Title
description: ''
use_operator: false
- operator: ''
+ operator: title_op
operator_limit_selection: false
operator_list: { }
- identifier: ''
+ identifier: title
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
- min_placeholder: ''
- max_placeholder: ''
- placeholder: ''
+ anonymous: '0'
+ administrator: '0'
is_grouped: false
group_info:
label: ''
@@ -1569,34 +1553,35 @@ display:
default_group: All
default_group_multiple: { }
group_items: { }
- default_langcode:
- id: default_langcode
- table: node_field_data
- field: default_langcode
+ computed_tags_active_tags:
+ id: computed_tags_active_tags
+ table: node__field_computed_tags
+ field: computed_tags_active_tags
relationship: none
group_type: group
admin_label: ''
- entity_type: node
- entity_field: default_langcode
- plugin_id: boolean
+ plugin_id: computed_tags_active_tags
operator: '='
- value: '1'
+ value: ''
group: 1
- exposed: false
+ exposed: true
expose:
operator_id: ''
- label: ''
+ label: Tags
description: ''
use_operator: false
- operator: ''
+ operator: computed_tags_active_tags_op
operator_limit_selection: false
operator_list: { }
- identifier: ''
+ identifier: tags
required: false
remember: false
- multiple: false
+ multiple: true
remember_roles:
authenticated: authenticated
+ anonymous: '0'
+ administrator: '0'
+ editor: '0'
is_grouped: false
group_info:
label: ''
@@ -1609,8 +1594,8 @@ display:
default_group: All
default_group_multiple: { }
group_items: { }
- moderation_state_1:
- id: moderation_state_1
+ moderation_state:
+ id: moderation_state
table: node_field_data
field: moderation_state
relationship: none
@@ -1618,38 +1603,55 @@ display:
admin_label: ''
entity_type: node
plugin_id: moderation_state_filter
- operator: 'not in'
+ operator: in
value:
+ all: all
+ article_workflow-draft: article_workflow-draft
+ article_workflow-published: article_workflow-published
article_workflow-trash: article_workflow-trash
+ article_workflow-unpublished: article_workflow-unpublished
group: 1
- exposed: false
+ exposed: true
expose:
- operator_id: ''
- label: ''
+ operator_id: moderation_state_op
+ label: Status
description: ''
use_operator: false
- operator: ''
+ operator: moderation_state_op
operator_limit_selection: false
operator_list: { }
- identifier: ''
+ identifier: status
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
+ anonymous: '0'
+ administrator: '0'
+ editor: '0'
reduce: false
- is_grouped: false
+ is_grouped: true
group_info:
- label: ''
+ label: Status
description: ''
- identifier: ''
+ identifier: moderation_state
optional: true
widget: select
multiple: false
remember: false
default_group: All
default_group_multiple: { }
- group_items: { }
+ group_items:
+ 1:
+ title: Published
+ operator: in
+ value:
+ article_workflow-published: article_workflow-published
+ 2:
+ title: Draft
+ operator: in
+ value:
+ article_workflow-draft: article_workflow-draft
filter_groups:
operator: AND
groups:
@@ -1898,14 +1900,15 @@ display:
type: string
settings:
link_to_entity: true
- field_tags:
- id: field_tags
- table: node__field_tags
- field: field_tags
+ term_node_tid:
+ id: term_node_tid
+ table: node_field_data
+ field: term_node_tid
relationship: none
group_type: group
admin_label: ''
- plugin_id: field
+ entity_type: node
+ plugin_id: taxonomy_index_tid
label: Tags
exclude: false
alter:
@@ -1947,20 +1950,21 @@ display:
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
+ type: separator
separator: ', '
- field_api_classes: false
+ link_to_taxonomy: false
+ limit: true
+ vids:
+ country: country
+ document_type: document_type
+ month: month
+ theme: theme
+ year: year
+ appeals: '0'
+ content_space: '0'
+ interactive_content_type: '0'
+ major_tags: '0'
+ story_type: '0'
latest_version:
id: latest_version
table: node
@@ -2366,36 +2370,35 @@ display:
default_group: All
default_group_multiple: { }
group_items: { }
- field_computed_tags_value:
- id: field_computed_tags_value
+ computed_tags_active_tags:
+ id: computed_tags_active_tags
table: node__field_computed_tags
- field: field_computed_tags_value
+ field: computed_tags_active_tags
relationship: none
group_type: group
admin_label: ''
- plugin_id: string
- operator: contains
+ plugin_id: computed_tags_active_tags
+ operator: '='
value: ''
group: 1
exposed: true
expose:
- operator_id: field_computed_tags_value_op
+ operator_id: ''
label: Tags
description: ''
use_operator: false
- operator: field_computed_tags_value_op
+ operator: computed_tags_active_tags_op
operator_limit_selection: false
operator_list: { }
identifier: tags
required: false
remember: false
- multiple: false
+ multiple: true
remember_roles:
authenticated: authenticated
anonymous: '0'
administrator: '0'
editor: '0'
- placeholder: ''
is_grouped: false
group_info:
label: ''
@@ -2600,7 +2603,6 @@ display:
- 'user.node_grants:view'
- user.permissions
tags:
- - 'config:field.storage.node.field_tags'
- 'config:workflow_list'
page_find_content:
id: page_find_content
@@ -2995,15 +2997,15 @@ display:
multi_type: separator
separator: ', '
field_api_classes: false
- field_tags:
- id: field_tags
- table: node__field_tags
- field: field_tags
+ field_theme:
+ id: field_theme
+ table: node__field_theme
+ field: field_theme
relationship: none
group_type: group
admin_label: ''
plugin_id: field
- label: Tags
+ label: Theme
exclude: false
alter:
alter_text: false
@@ -3476,10 +3478,10 @@ display:
hierarchy: false
limit: true
error_message: true
- field_tags_target_id:
- id: field_tags_target_id
- table: node__field_tags
- field: field_tags_target_id
+ field_theme_target_id:
+ id: field_theme_target_id
+ table: node__field_theme
+ field: field_theme_target_id
relationship: none
group_type: group
admin_label: ''
@@ -3489,14 +3491,14 @@ display:
group: 1
exposed: true
expose:
- operator_id: field_tags_target_id_op
- label: Tags
+ operator_id: field_theme_target_id_op
+ label: Theme
description: ''
use_operator: false
- operator: field_tags_target_id_op
+ operator: field_theme_target_id_op
operator_limit_selection: false
operator_list: { }
- identifier: tags
+ identifier: theme
required: false
remember: false
multiple: false
@@ -3519,7 +3521,7 @@ display:
default_group_multiple: { }
group_items: { }
reduce_duplicates: false
- vid: major_tags
+ vid: theme
type: textfield
hierarchy: false
limit: true
@@ -3608,7 +3610,7 @@ display:
- 'config:field.storage.node.field_content_space'
- 'config:field.storage.node.field_country'
- 'config:field.storage.node.field_document_type'
- - 'config:field.storage.node.field_tags'
+ - 'config:field.storage.node.field_theme'
page_stories:
id: page_stories
display_title: Stories
diff --git a/config/views.view.theme_selection.yml b/config/views.view.theme_selection.yml
new file mode 100644
index 00000000..2af72eff
--- /dev/null
+++ b/config/views.view.theme_selection.yml
@@ -0,0 +1,217 @@
+uuid: 62c99c59-55f1-4120-a80f-e6a28bcbf195
+langcode: en
+status: true
+dependencies:
+ config:
+ - taxonomy.vocabulary.theme
+ module:
+ - taxonomy
+ - user
+id: theme_selection
+label: 'Theme selection'
+module: views
+description: ''
+tag: ''
+base_table: taxonomy_term_field_data
+base_field: tid
+display:
+ default:
+ id: default
+ display_title: Default
+ display_plugin: default
+ position: 0
+ display_options:
+ title: 'Theme selection'
+ fields:
+ name:
+ id: name
+ table: taxonomy_term_field_data
+ field: name
+ relationship: none
+ group_type: group
+ admin_label: ''
+ entity_type: taxonomy_term
+ entity_field: name
+ plugin_id: term_name
+ 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
+ convert_spaces: false
+ pager:
+ type: none
+ options:
+ offset: 0
+ 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
+ access:
+ type: perm
+ options:
+ perm: 'access content'
+ cache:
+ type: tag
+ options: { }
+ empty: { }
+ sorts: { }
+ arguments: { }
+ filters:
+ status:
+ id: status
+ table: taxonomy_term_field_data
+ field: status
+ entity_type: taxonomy_term
+ entity_field: status
+ plugin_id: boolean
+ value: '1'
+ group: 1
+ expose:
+ operator: ''
+ vid:
+ id: vid
+ table: taxonomy_term_field_data
+ field: vid
+ entity_type: taxonomy_term
+ entity_field: vid
+ plugin_id: bundle
+ value:
+ theme: theme
+ depth_level:
+ id: depth_level
+ table: taxonomy_term_field_data
+ field: depth_level
+ relationship: none
+ group_type: group
+ admin_label: ''
+ entity_type: taxonomy_term
+ plugin_id: numeric
+ operator: '='
+ value:
+ min: ''
+ max: ''
+ 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
+ min_placeholder: ''
+ max_placeholder: ''
+ placeholder: ''
+ is_grouped: false
+ group_info:
+ label: ''
+ description: ''
+ identifier: ''
+ optional: true
+ widget: select
+ multiple: false
+ remember: false
+ default_group: All
+ default_group_multiple: { }
+ group_items: { }
+ style:
+ type: default
+ row:
+ type: fields
+ 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.permissions
+ tags: { }
+ entity_reference_1:
+ id: entity_reference_1
+ display_title: 'Theme parent tags'
+ display_plugin: entity_reference
+ position: 1
+ display_options:
+ pager:
+ type: none
+ options:
+ offset: 0
+ style:
+ type: entity_reference
+ options:
+ search_fields:
+ name: name
+ row:
+ type: entity_reference
+ options:
+ default_field_elements: false
+ inline: { }
+ separator: '-'
+ hide_empty: false
+ display_description: ''
+ display_extenders: { }
+ cache_metadata:
+ max-age: -1
+ contexts:
+ - 'languages:language_content'
+ - 'languages:language_interface'
+ - user.permissions
+ tags: { }
diff --git a/config/views.view.trash_nodes.yml b/config/views.view.trash_nodes.yml
index bc50d913..57e3f1ed 100644
--- a/config/views.view.trash_nodes.yml
+++ b/config/views.view.trash_nodes.yml
@@ -3,10 +3,8 @@ langcode: en
status: true
dependencies:
config:
- - field.storage.node.field_tags
- node.type.article
- node.type.document
- - taxonomy.vocabulary.major_tags
- workflows.workflow.article_workflow
module:
- content_moderation
@@ -182,14 +180,15 @@ display:
multi_type: separator
separator: ', '
field_api_classes: false
- field_tags:
- id: field_tags
- table: node__field_tags
- field: field_tags
+ term_node_tid:
+ id: term_node_tid
+ table: node_field_data
+ field: term_node_tid
relationship: none
group_type: group
admin_label: ''
- plugin_id: field
+ entity_type: node
+ plugin_id: taxonomy_index_tid
label: Tags
exclude: false
alter:
@@ -231,20 +230,20 @@ display:
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
+ type: separator
separator: ', '
- field_api_classes: false
+ link_to_taxonomy: false
+ limit: true
+ vids:
+ country: country
+ document_type: document_type
+ theme: theme
+ year: year
+ appeals: '0'
+ content_space: '0'
+ interactive_content_type: '0'
+ major_tags: '0'
+ story_type: '0'
changed:
id: changed
table: node_field_data
@@ -492,24 +491,24 @@ display:
default_group: All
default_group_multiple: { }
group_items: { }
- field_tags_target_id:
- id: field_tags_target_id
- table: node__field_tags
- field: field_tags_target_id
+ field_computed_tags_value:
+ id: field_computed_tags_value
+ table: node__field_computed_tags
+ field: field_computed_tags_value
relationship: none
group_type: group
admin_label: ''
- plugin_id: taxonomy_index_tid
- operator: or
- value: { }
+ plugin_id: string
+ operator: '='
+ value: ''
group: 1
exposed: true
expose:
- operator_id: field_tags_target_id_op
+ operator_id: field_computed_tags_value_op
label: Tags
description: ''
use_operator: false
- operator: field_tags_target_id_op
+ operator: field_computed_tags_value_op
operator_limit_selection: false
operator_list: { }
identifier: tags
@@ -521,7 +520,7 @@ display:
anonymous: '0'
administrator: '0'
editor: '0'
- reduce: false
+ placeholder: ''
is_grouped: false
group_info:
label: ''
@@ -534,12 +533,6 @@ display:
default_group: All
default_group_multiple: { }
group_items: { }
- reduce_duplicates: false
- vid: major_tags
- type: textfield
- hierarchy: false
- limit: true
- error_message: true
type:
id: type
table: node_field_data
@@ -720,11 +713,9 @@ display:
- 'languages:language_interface'
- url
- url.query_args
- - user
- 'user.node_grants:view'
- user.permissions
tags:
- - 'config:field.storage.node.field_tags'
- 'config:workflow_list'
page_trash:
id: page_trash
@@ -765,9 +756,7 @@ display:
- 'languages:language_interface'
- url
- url.query_args
- - user
- 'user.node_grants:view'
- user.permissions
tags:
- - 'config:field.storage.node.field_tags'
- 'config:workflow_list'
diff --git a/html/modules/custom/ncms_graphql/ncms_graphql.info.yml b/html/modules/custom/ncms_graphql/ncms_graphql.info.yml
index ce6ca0ca..fcab5f57 100644
--- a/html/modules/custom/ncms_graphql/ncms_graphql.info.yml
+++ b/html/modules/custom/ncms_graphql/ncms_graphql.info.yml
@@ -6,4 +6,5 @@ dependencies:
- graphql:graphql
- node:node
- ncms_paragraphs:ncms_paragraphs
+ - ncms_tags:ncms_tags
core_version_requirement: ^9.3 || ^10
diff --git a/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/DataProducer/ArticleExport.php b/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/DataProducer/ArticleExport.php
index 6d8c5a0f..d17d69e9 100644
--- a/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/DataProducer/ArticleExport.php
+++ b/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/DataProducer/ArticleExport.php
@@ -2,14 +2,10 @@
namespace Drupal\ncms_graphql\Plugin\GraphQL\DataProducer;
-use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\TranslatableInterface;
-use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\graphql\GraphQL\Execution\FieldContext;
-use Drupal\graphql\Plugin\GraphQL\DataProducer\DataProducerPluginBase;
use Drupal\node\NodeInterface;
use GraphQL\Deferred;
-use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Load all exportable articles.
@@ -30,52 +26,7 @@
* }
* )
*/
-class ArticleExport extends DataProducerPluginBase implements ContainerFactoryPluginInterface {
-
- /**
- * The entity type manager service.
- *
- * @var \Drupal\Core\Entity\EntityTypeManagerInterface
- */
- protected $entityTypeManager;
-
- /**
- * {@inheritdoc}
- *
- * @codeCoverageIgnore
- */
- public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
- return new static(
- $configuration,
- $plugin_id,
- $plugin_definition,
- $container->get('entity_type.manager')
- );
- }
-
- /**
- * EntityLoad constructor.
- *
- * @param array $configuration
- * The plugin configuration array.
- * @param string $pluginId
- * The plugin id.
- * @param array $pluginDefinition
- * The plugin definition array.
- * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
- * The entity type manager service.
- *
- * @codeCoverageIgnore
- */
- public function __construct(
- array $configuration,
- $pluginId,
- array $pluginDefinition,
- EntityTypeManagerInterface $entityTypeManager
- ) {
- parent::__construct($configuration, $pluginId, $pluginDefinition);
- $this->entityTypeManager = $entityTypeManager;
- }
+class ArticleExport extends ContentExportBase {
/**
* Resolver.
@@ -109,21 +60,7 @@ public function resolve(array $tags = NULL, FieldContext $context) {
$query->sort('changed', 'DESC');
if (!empty($tags)) {
- // Add conditions to limit to specific tags, either on the article
- // itself or on the referenced content space.
- $terms = $this->entityTypeManager->getStorage('taxonomy_term')->loadByProperties([
- 'vid' => 'major_tags',
- 'name' => $tags,
- ]);
- $tag_ids = array_keys($terms);
- foreach ($tag_ids as $tag_id) {
- $and_condition = $query->andConditionGroup();
- $or_condition = $query->orConditionGroup();
- $or_condition->condition('field_content_space.entity.field_major_tags', $tag_id);
- $or_condition->condition('field_tags', $tag_id);
- $and_condition->condition($or_condition);
- $query->condition($and_condition);
- }
+ $this->addTagConditionsToQuery($query, $tags);
}
$entity_ids = $query->execute();
diff --git a/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/DataProducer/ContentExportBase.php b/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/DataProducer/ContentExportBase.php
new file mode 100644
index 00000000..6525c8af
--- /dev/null
+++ b/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/DataProducer/ContentExportBase.php
@@ -0,0 +1,67 @@
+entityTypeManager = $container->get('entity_type.manager');
+ $instance->commonTaxonomies = $container->get('ncms_tags.common_taxonomies');
+ return $instance;
+ }
+
+ /**
+ * Add tag conditions to an export query.
+ *
+ * @param \Drupal\Core\Entity\Query\QueryInterface $query
+ * The database query object.
+ * @param string[] $tags
+ * The list of tags to search for.
+ */
+ protected function addTagConditionsToQuery(QueryInterface $query, $tags) {
+ // Add conditions to limit to specific tags, either on the content node
+ // itself or on the referenced content space.
+ $terms = $this->entityTypeManager->getStorage('taxonomy_term')->loadByProperties([
+ 'vid' => $this->commonTaxonomies->getCommonTaxonomyBundles(),
+ 'name' => $tags,
+ ]);
+ $tag_ids = array_keys($terms);
+ foreach ($tag_ids as $tag_id) {
+ $and_condition = $query->andConditionGroup();
+ $or_condition = $query->orConditionGroup();
+ $or_condition->condition('field_content_space.entity.field_computed_tags', $tag_id);
+ foreach ($this->commonTaxonomies->getCommonTaxonomyFieldNames() as $field_name) {
+ $or_condition->condition($field_name, $tag_id);
+ }
+ $and_condition->condition($or_condition);
+ $query->condition($and_condition);
+ }
+ }
+
+}
diff --git a/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/DataProducer/DocumentExport.php b/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/DataProducer/DocumentExport.php
index 89915c9b..b3b64712 100644
--- a/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/DataProducer/DocumentExport.php
+++ b/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/DataProducer/DocumentExport.php
@@ -2,14 +2,10 @@
namespace Drupal\ncms_graphql\Plugin\GraphQL\DataProducer;
-use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\TranslatableInterface;
-use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\graphql\GraphQL\Execution\FieldContext;
-use Drupal\graphql\Plugin\GraphQL\DataProducer\DataProducerPluginBase;
use Drupal\node\NodeInterface;
use GraphQL\Deferred;
-use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Load all exportable documents.
@@ -30,52 +26,7 @@
* }
* )
*/
-class DocumentExport extends DataProducerPluginBase implements ContainerFactoryPluginInterface {
-
- /**
- * The entity type manager service.
- *
- * @var \Drupal\Core\Entity\EntityTypeManagerInterface
- */
- protected $entityTypeManager;
-
- /**
- * {@inheritdoc}
- *
- * @codeCoverageIgnore
- */
- public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
- return new static(
- $configuration,
- $plugin_id,
- $plugin_definition,
- $container->get('entity_type.manager')
- );
- }
-
- /**
- * EntityLoad constructor.
- *
- * @param array $configuration
- * The plugin configuration array.
- * @param string $pluginId
- * The plugin id.
- * @param array $pluginDefinition
- * The plugin definition array.
- * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
- * The entity type manager service.
- *
- * @codeCoverageIgnore
- */
- public function __construct(
- array $configuration,
- $pluginId,
- array $pluginDefinition,
- EntityTypeManagerInterface $entityTypeManager
- ) {
- parent::__construct($configuration, $pluginId, $pluginDefinition);
- $this->entityTypeManager = $entityTypeManager;
- }
+class DocumentExport extends ContentExportBase {
/**
* Resolver.
@@ -109,21 +60,7 @@ public function resolve(array $tags = NULL, FieldContext $context) {
$query->sort('changed', 'DESC');
if (!empty($tags)) {
- // Add conditions to limit to specific tags, either on the document
- // itself or on the referenced content space.
- $terms = $this->entityTypeManager->getStorage('taxonomy_term')->loadByProperties([
- 'vid' => 'major_tags',
- 'name' => $tags,
- ]);
- $tag_ids = array_keys($terms);
- foreach ($tag_ids as $tag_id) {
- $and_condition = $query->andConditionGroup();
- $or_condition = $query->orConditionGroup();
- $or_condition->condition('field_content_space.entity.field_major_tags', $tag_id);
- $or_condition->condition('field_tags', $tag_id);
- $and_condition->condition($or_condition);
- $query->condition($and_condition);
- }
+ $this->addTagConditionsToQuery($query, $tags);
}
$entity_ids = $query->execute();
diff --git a/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/SchemaExtension/NcmsSchemaExtension.php b/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/SchemaExtension/NcmsSchemaExtension.php
index d6a72dd0..37cd0133 100644
--- a/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/SchemaExtension/NcmsSchemaExtension.php
+++ b/html/modules/custom/ncms_graphql/src/Plugin/GraphQL/SchemaExtension/NcmsSchemaExtension.php
@@ -535,17 +535,7 @@ private function addFieldResolverContentSpace(ResolverRegistryInterface $registr
->map('entity', $builder->fromParent())
);
$registry->addFieldResolver('ContentSpace', 'tags',
- $builder->compose(
- $builder->produce('entity_reference')
- ->map('entity', $builder->fromParent())
- ->map('field', $builder->fromValue('field_major_tags')),
- $builder->callback(function ($tags) {
- $tags = array_map(function ($tag) {
- return $tag->label();
- }, $tags);
- return $tags;
- }),
- ),
+ $this->buildFromComputedTags($builder, 'taxonomy_term'),
);
}
diff --git a/html/modules/custom/ncms_tags/css/input.computed_tags.css b/html/modules/custom/ncms_tags/css/input.computed_tags.css
new file mode 100644
index 00000000..8ba98428
--- /dev/null
+++ b/html/modules/custom/ncms_tags/css/input.computed_tags.css
@@ -0,0 +1,14 @@
+.computed-tags-filter.active-tags.ui-autocomplete-input {
+ flex-wrap: nowrap;
+ min-width: 25rem;
+ margin-inline-end: initial;
+}
+.computed-tags-filter.active-tags.ui-autocomplete-input > tag {
+ margin-block: auto;
+}
+.computed-tags-filter.active-tags.ui-autocomplete-input > tag .active-tags__tag__text {
+ white-space: nowrap;
+}
+.computed-tags-filter.active-tags.ui-autocomplete-input > * {
+ padding: 0;
+}
\ No newline at end of file
diff --git a/html/modules/custom/ncms_tags/ncms_tags.deploy.php b/html/modules/custom/ncms_tags/ncms_tags.deploy.php
index 4203c2d8..028744e6 100644
--- a/html/modules/custom/ncms_tags/ncms_tags.deploy.php
+++ b/html/modules/custom/ncms_tags/ncms_tags.deploy.php
@@ -5,13 +5,12 @@
* Deploy functions for HPC Content Module Tags.
*/
-use Drupal\taxonomy\TermInterface;
-
/**
* Setup the country vocabulary.
*/
-function ncms_tags_deploy_setup_country_vocabulary(&$sandbox) {
+function ncms_tags_deploy_1_setup_country_vocabulary(&$sandbox) {
$countries = [
+ // Countries as available in the API.
'Afghanistan',
'Åland Islands',
'Albania',
@@ -69,7 +68,10 @@ function ncms_tags_deploy_setup_country_vocabulary(&$sandbox) {
'Côte d\'Ivoire',
'Croatia',
'Cuba',
- 'Curaçao (Netherlands)',
+ [
+ 'name' => ['Curaçao (Netherlands)'],
+ 'alternatives' => ['Curacao'],
+ ],
'Cyprus',
'Czech Republic',
'Denmark',
@@ -118,7 +120,10 @@ function ncms_tags_deploy_setup_country_vocabulary(&$sandbox) {
'Iceland',
'India',
'Indonesia',
- 'Iran, Islamic Republic of',
+ [
+ 'name' => 'Iran, Islamic Republic of',
+ 'alternatives' => ['Iran'],
+ ],
'Iraq',
'Ireland',
'Isle of Man',
@@ -158,7 +163,10 @@ function ncms_tags_deploy_setup_country_vocabulary(&$sandbox) {
'Mayotte',
'Mexico',
'Micronesia, Federated States of',
- 'Moldova, Republic of',
+ [
+ 'name' => 'Moldova, Republic of',
+ 'alternatives' => ['Republic of Moldova'],
+ ],
'Monaco',
'Mongolia',
'Montenegro',
@@ -234,7 +242,10 @@ function ncms_tags_deploy_setup_country_vocabulary(&$sandbox) {
'Syrian Arab Republic',
'Taiwan, Province of China',
'Tajikistan',
- 'Tanzania',
+ [
+ 'name' => 'Tanzania',
+ 'alternatives' => ['United Republic of Tanzania'],
+ ],
'Thailand',
'Timor-Leste',
'Togo',
@@ -264,11 +275,33 @@ function ncms_tags_deploy_setup_country_vocabulary(&$sandbox) {
'Yemen',
'Zambia',
'Zimbabwe',
+ // Regions.
+ [
+ 'name' => 'Asia and the Pacific',
+ 'alternatives' => ['Asia', 'Pacific Islands'],
+ ],
+ [
+ 'name' => 'Europe',
+ 'alternatives' => ['Eastern Europe'],
+ ],
+ 'Latin America and the Caribbean',
+ 'Middle East and North Africa',
+ [
+ 'name' => 'Southern and Eastern Africa',
+ 'alternatives' => ['Southern and East Africa', 'Horn of Africa'],
+ ],
+ 'West and Central Africa',
+ // World.
'World',
];
+ /** @var \Drupal\ncms_tags\TagMigration $tag_migration */
+ $tag_migration = \Drupal::service('ncms_tags.tag_migration');
$not_migrated = [];
foreach ($countries as $key => $country) {
- $result = ncms_tags_create_and_migrate('country', $country, $key, 'field_country');
+ $country_name = is_array($country) ? $country['name'] : $country;
+ $country_alternatives = is_array($country) ? $country['alternatives'] : [];
+ $country_term = $tag_migration->createTag('country', $country_name, $key);
+ $result = $tag_migration->migrateTag($country_term, $country_alternatives);
if ($result === FALSE) {
$not_migrated[] = $country;
}
@@ -289,7 +322,7 @@ function ncms_tags_deploy_setup_country_vocabulary(&$sandbox) {
/**
* Setup the document type vocabulary.
*/
-function ncms_tags_deploy_setup_document_type_vocabulary(&$sandbox) {
+function ncms_tags_deploy_2_setup_document_type_vocabulary(&$sandbox) {
$document_types = [
'HNO',
'HRP',
@@ -299,14 +332,27 @@ function ncms_tags_deploy_setup_document_type_vocabulary(&$sandbox) {
'name' => 'GHO Monthly',
'alternatives' => ['GHO Monthly update'],
],
- 'Flash Appeal',
- 'Other plan',
+ [
+ 'name' => 'Flash Appeal',
+ 'alternatives' => ['FA'],
+ ],
+ [
+ 'name' => 'Regional plan',
+ 'alternatives' => ['RMRP', 'RRP'],
+ ],
+ [
+ 'name' => 'Other plan',
+ 'alternatives' => ['ERP', 'Rohingya'],
+ ],
];
+ /** @var \Drupal\ncms_tags\TagMigration $tag_migration */
+ $tag_migration = \Drupal::service('ncms_tags.tag_migration');
$not_migrated = [];
foreach ($document_types as $key => $document_type) {
$document_type_name = is_array($document_type) ? $document_type['name'] : $document_type;
$document_type_alternatives = is_array($document_type) ? $document_type['alternatives'] : [];
- $result = ncms_tags_create_and_migrate('document_type', $document_type_name, $key, 'field_document_type', $document_type_alternatives);
+ $document_type_term = $tag_migration->createTag('document_type', $document_type_name, $key);
+ $result = $tag_migration->migrateTag($document_type_term, $document_type_alternatives);
if ($result === FALSE) {
$not_migrated[] = $document_type_name;
}
@@ -327,14 +373,16 @@ function ncms_tags_deploy_setup_document_type_vocabulary(&$sandbox) {
/**
* Setup the document type vocabulary.
*/
-function ncms_tags_deploy_setup_years_vocabulary(&$sandbox) {
+function ncms_tags_deploy_3_setup_years_vocabulary(&$sandbox) {
$years = array_reverse(range(1980, 2025));
+ /** @var \Drupal\ncms_tags\TagMigration $tag_migration */
+ $tag_migration = \Drupal::service('ncms_tags.tag_migration');
$not_migrated = [];
foreach ($years as $key => $year) {
- $year_name = $year;
- $result = ncms_tags_create_and_migrate('year', $year_name, $key, 'field_year');
+ $year_term = $tag_migration->createTag('year', $year, $key);
+ $result = $tag_migration->migrateTag($year_term);
if ($result === FALSE) {
- $not_migrated[] = $year_name;
+ $not_migrated[] = $year;
}
}
if (count($not_migrated)) {
@@ -351,121 +399,519 @@ function ncms_tags_deploy_setup_years_vocabulary(&$sandbox) {
}
/**
- * Create and migrate a term for the given vocabulary.
- *
- * @param string $vid
- * The machine name of the vocabulary.
- * @param string $term_name
- * The term name.
- * @param int $weight
- * The weight of the term in the vocabulary.
- * @param string $field_name
- * The field name of the term on article nodes.
- * @param string[] $alternative_names
- * An optional list of alternative names for the given term.
- *
- * @return bool
- * The result state of the operation.
+ * Setup the document type vocabulary.
*/
-function ncms_tags_create_and_migrate($vid, $term_name, $weight, $field_name, $alternative_names = []) {
- $node_storage = \Drupal::entityTypeManager()->getStorage('node');
- $term_storage = \Drupal::entityTypeManager()->getStorage('taxonomy_term');
- $paragraph_storage = \Drupal::entityTypeManager()->getStorage('paragraph');
-
- /** @var \Drupal\taxonomy\TermInterface $term */
- $term = $term_storage->create([
- 'vid' => $vid,
- 'name' => $term_name,
- 'weight' => $weight,
- ]);
- $term->save();
-
- /** @var \Drupal\taxonomy\TermInterface $tag */
- $tag = $term_storage->loadByProperties([
- 'vid' => 'major_tags',
- 'name' => $term->getName(),
- ]);
- $tag = is_array($tag) ? reset($tag) : $tag;
-
- /** @var \Drupal\taxonomy\TermInterface[] $alternative_terms */
- $alternative_terms = !empty($alternative_names) ? $term_storage->loadByProperties([
- 'vid' => 'major_tags',
- 'name' => $alternative_names,
- ]) : [];
-
- if (!$tag instanceof TermInterface && empty($alternative_terms)) {
- return FALSE;
+function ncms_tags_deploy_4_setup_months_vocabulary(&$sandbox) {
+ $months = [
+ 'January',
+ 'February',
+ 'March',
+ 'April',
+ 'May',
+ 'June',
+ 'July',
+ 'August',
+ 'September',
+ 'October',
+ 'November',
+ 'December',
+ ];
+ /** @var \Drupal\ncms_tags\TagMigration $tag_migration */
+ $tag_migration = \Drupal::service('ncms_tags.tag_migration');
+ $not_migrated = [];
+ foreach ($months as $key => $month) {
+ $month_term = $tag_migration->createTag('month', $month, $key);
+ $result = $tag_migration->migrateTag($month_term);
+ if ($result === FALSE) {
+ $not_migrated[] = $month;
+ }
}
-
- $tag_ids = [];
- if ($tag) {
- $tag_ids[] = $tag->id();
+ if (count($not_migrated)) {
+ return t('Processed @processed month tags, skipped migration for these tags: @not_migrated', [
+ '@processed' => count($months),
+ '@not_migrated' => implode(', ', $not_migrated),
+ ]);
}
- if (!empty($alternative_terms)) {
- $alternative_tag_ids = array_map(function (TermInterface $_term) {
- return $_term->id();
- }, $alternative_terms);
- $tag_ids = array_merge($tag_ids, $alternative_tag_ids);
+ else {
+ return t('Processed @processed year tags', [
+ '@processed' => count($months),
+ ]);
}
+}
- /** @var \Drupal\node\NodeInterface[] $nodes */
- $nodes = $node_storage->loadByProperties([
- 'type' => ['article', 'document'],
- 'field_tags' => $tag_ids,
- ]);
- foreach ($nodes as $node) {
- $tags = $node->get('field_tags')->getValue();
- $tags = array_filter($tags, function ($_tag) use ($tag_ids) {
- return !in_array($_tag['target_id'], $tag_ids);
- });
- $node->get('field_tags')->setValue($tags);
- $node->get($field_name)->setValue($term);
- $node->setNewRevision(FALSE);
- $node->setSyncing(TRUE);
- $node->save();
+/**
+ * Setup the theme vocabulary.
+ */
+function ncms_tags_deploy_5_setup_theme_vocabulary(&$sandbox) {
+ $themes = [
+ 'Access' => [
+ 'Bureaucratic impediments',
+ 'Safe passage',
+ 'Operational constraints',
+ 'Cross-border operation',
+ 'Security Council authorization',
+ 'Safe zones',
+ ],
+ 'Accountability to affected people' => [
+ 'Complaint mechanisms',
+ 'Transparency',
+ 'Monitoring',
+ 'Program monitoring',
+ 'Community consultations',
+ ],
+ 'Anticipatory action' => [
+ 'alternatives' => ['Anticipatory Action'],
+ 'children' => [
+ 'Preparedness',
+ 'Early warning systems',
+ 'Risk mitigation',
+ 'Disaster preparedness',
+ 'Forecast-based financing',
+ ],
+ ],
+ 'Camp coordination and camp management (CCCM)' => [
+ 'Site planning and development',
+ 'Camp infrastructure maintenance',
+ 'Community mobilization',
+ 'Protection and safety in camps',
+ 'Shelter allocation',
+ 'Displacement tracking and monitoring',
+ ],
+ 'Cash' => [
+ 'Cash assistance',
+ 'Vouchers',
+ 'Economic recovery',
+ 'Livelihood support',
+ 'Cash for work',
+ 'Cash transfers',
+ ],
+ 'Children' => [
+ 'Child protection',
+ 'Education in crisis',
+ ],
+ 'Climate change' => [
+ 'Climate emergencies',
+ 'Displacement',
+ 'Natural disasters',
+ 'Adaptation strategies',
+ 'Environmental degradation',
+ ],
+ 'Conflict' => [
+ 'Civilian casualties',
+ 'Peacebuilding',
+ ],
+ 'Coordination' => [
+ 'Interagency',
+ 'Joint operations',
+ 'Response planning',
+ 'Resource sharing',
+ 'Field-level coordination',
+ 'Cluster coordination',
+ ],
+ 'COVID-19' => [
+ 'Vaccination campaigns',
+ 'Health services',
+ 'Disease outbreaks',
+ 'Social distancing measures',
+ 'Pandemic response',
+ 'Vaccine shortages',
+ ],
+ 'Data and technology' => [
+ 'alternatives' => ['Data Responsibility'],
+ 'children' => [],
+ ],
+ 'Disasters' => [
+ 'alternatives' => ['Disaster Response', 'Natural Disasters'],
+ 'children' => [
+ 'Natural disasters',
+ 'Cyclones',
+ 'Earthquakes',
+ 'Flooding',
+ 'Natural disaster response',
+ 'Relief',
+ ],
+ ],
+ 'Disease' => [
+ 'Cholera',
+ 'Malaria',
+ 'Measles',
+ 'COVID-19',
+ 'Outbreaks',
+ 'Malaria',
+ ],
+ 'Displacement' => [
+ 'alternatives' => ['Migrants', 'Refugees'],
+ 'children' => [
+ 'Internal displacement',
+ 'Refugee movements',
+ 'IDP camps',
+ 'Cross-border displacement',
+ 'Refugee flows',
+ ],
+ ],
+ 'Early recovery' => [
+ 'Site planning and development',
+ 'Camp infrastructure maintenance',
+ 'Community mobilization',
+ 'Protection and safety in camps',
+ 'Shelter allocation',
+ 'Displacement tracking and monitoring',
+ ],
+ 'Economy' => [
+ 'Economic shocks',
+ 'Poverty',
+ 'Job loss',
+ 'Livelihoods',
+ 'Economic sensitivity',
+ 'Deflation',
+ 'Economic instability',
+ ],
+ 'Education' => [
+ 'Schools in emergencies',
+ 'Remote learning',
+ 'Access to education',
+ 'Emergency education programs',
+ 'School rebuilding',
+ ],
+ 'Emergency shelter' => [
+ 'Shelter materials distribution',
+ 'Transitional shelter solutions',
+ 'Temporary housing setup',
+ 'Site selection for temporary shelters',
+ ],
+ 'Emergency telecommunications' => [
+ 'Satellite communications',
+ 'Radio communications',
+ 'Mobile network services',
+ 'Internet connectivity',
+ 'Telecommunication infrastructure',
+ 'Network security',
+ ],
+ 'Financing' => [
+ 'Funding',
+ 'Funding gaps',
+ 'Donor contributions',
+ 'Pooled funds',
+ 'Contributions',
+ 'Donor shortfalls',
+ ],
+ 'Food security' => [
+ 'alternatives' => ['Food Insecurity'],
+ 'children' => [
+ 'Acute food insecurity',
+ 'Malnutrition',
+ 'Cash assistance',
+ 'Famine prevention',
+ 'Agricultural assistance',
+ ],
+ ],
+ 'Funding' => [
+ 'Humanitarian funding',
+ 'Funding gaps',
+ 'Donor contributions',
+ 'Resource mobilization',
+ 'Funding appeals',
+ ],
+ 'Gender' => [
+ 'Gender equality',
+ 'Women empowerment',
+ 'Gender-based violence (GBV)',
+ 'Reproductive health',
+ 'Gender-sensitive programming',
+ "Women's participation in humanitarian work",
+ ],
+ 'Gender-based violence (GBV)' => [
+ 'alternatives' => ['Gender-Based Violence'],
+ 'children' => [
+ 'Survivor support',
+ 'Women protection',
+ 'Legal aid',
+ 'Sexual violence prevention',
+ 'Survivor services',
+ 'Safe spaces for women',
+ ],
+ ],
+ 'Health' => [
+ 'Emergency health services',
+ 'Vaccinations',
+ 'Healthcare access',
+ 'Mental health support',
+ 'Trauma care',
+ 'Emergency health response',
+ ],
+ 'Humanitarian-development-peace collaboration' => [
+ 'alternatives' => ['Development', 'Nexus', 'Peacebuilding'],
+ 'children' => [
+ 'Resilience building',
+ 'Sustainable development',
+ 'Partnerships',
+ 'Capacity building',
+ 'Resilience building',
+ 'Development linkages',
+ ],
+ ],
+ 'Hunger' => [
+ 'alternatives' => ['Famine'],
+ 'children' => [
+ 'Acute food insecurity',
+ 'Malnutrition',
+ 'Food aid',
+ 'Agriculture support',
+ 'Food aid',
+ 'Emergency feeding',
+ ],
+ ],
+ 'Immunizations' => [
+ 'alternatives' => ['Vaccines'],
+ 'children' => [
+ 'COVID-19 vaccines',
+ 'Measles vaccination',
+ 'Routine immunizations',
+ 'Routine vaccine programs',
+ 'Cold chain support',
+ ],
+ ],
+ 'Inter-agency' => [
+ 'alternatives' => ['Interagency'],
+ 'children' => [
+ 'Coordination',
+ 'Partnerships',
+ 'Joint planning',
+ 'Resource sharing',
+ 'Humanitarian coordination',
+ 'Cluster approach',
+ ],
+ ],
+ 'Localization' => [
+ 'Local partnerships',
+ 'Community engagement',
+ 'National actors',
+ 'Capacity building',
+ 'Support to local NGOs',
+ 'Capacity strengthening',
+ ],
+ 'Logistics' => [
+ 'Transportation of aid supplies',
+ 'Warehousing and storage',
+ 'Supply chain management',
+ 'Coordination of humanitarian convoys',
+ 'Customs and border clearance',
+ 'Air, land, and sea operations',
+ ],
+ 'Mental health and psychosocial support' => [
+ 'alternatives' => ['Mental Health', 'Psychosocial Support'],
+ 'children' => [
+ 'Psychological first aid',
+ 'Trauma recovery',
+ 'Community-based support',
+ 'Access to mental health services',
+ 'Counseling services',
+ 'Trauma recovery',
+ ],
+ ],
+ 'Needs analysis' => [
+ 'alternatives' => ['Analysis', 'Needs'],
+ 'children' => [
+ 'Data collection',
+ 'Joint needs assessment',
+ 'Vulnerability analysis',
+ 'Humanitarian planning',
+ 'Vulnerability assessments',
+ 'Data-driven response',
+ ],
+ ],
+ 'Negotiation' => [
+ 'Humanitarian diplomacy',
+ 'Access negotiations',
+ 'Peace talks',
+ 'Ceasefire agreements',
+ 'Access agreements',
+ 'Local negotiations',
+ ],
+ 'Nutrition' => [
+ 'Malnutrition',
+ 'Food aid',
+ 'Child nutrition',
+ 'Emergency feeding',
+ 'Child malnutrition',
+ 'Supplementary feeding',
+ ],
+ 'Partners' => [
+ 'alternatives' => ['NGO', 'Private Sector', 'UNDAC'],
+ 'children' => [],
+ ],
+ 'Pooled funds' => [
+ 'alternatives' => ['CBPFs', 'CERF'],
+ 'children' => [
+ 'Country-Based Pooled Funds',
+ 'Central Emergency Response Fund',
+ 'Flexible funding',
+ 'Donor coordination',
+ 'Emergency allocations',
+ 'CERF funding',
+ ],
+ ],
+ 'Poverty' => [
+ 'Economic inequality',
+ 'Job loss',
+ 'Social safety nets',
+ 'Cash assistance',
+ 'Livelihood recovery',
+ 'Income support',
+ ],
+ 'Protection' => [
+ 'Child protection',
+ 'Gender-based violence (GBV)',
+ 'Legal aid',
+ 'Safe spaces',
+ 'Legal aid',
+ 'Protection of civilians',
+ 'Mine action',
+ 'Housing, land, and property',
+ ],
+ 'Protection from sexual exploitation and abuse' => [
+ 'alternatives' => ['Sexual Abuse'],
+ 'children' => [
+ 'Legal frameworks',
+ 'Survivor assistance',
+ 'Prevention programs',
+ 'Reporting mechanisms',
+ 'Safeguarding programs',
+ 'Incident reporting',
+ ],
+ ],
+ 'Violence' => [
+ 'Armed conflict',
+ 'Civilian casualties',
+ 'Gender-based violence (GBV)',
+ 'Child protection',
+ 'Armed violence',
+ 'Civilian protection',
+ ],
+ 'Vulnerable areas' => [
+ 'Conflict zones',
+ 'Drought-affected areas',
+ 'Urban slums',
+ 'Disaster-prone regions',
+ 'Conflict zones',
+ ],
+ 'Water, Sanitation, and Hygiene (WASH)' => [
+ 'Water supply systems',
+ 'Sanitation facility construction',
+ 'Hygiene promotion and education',
+ 'Waste management and disposal',
+ 'Water quality monitoring',
+ 'Latrine construction and maintenance',
+ ],
+ 'Women' => [
+ 'alternatives' => ['Women and Girls'],
+ 'children' => [
+ 'Women empowerment',
+ 'Gender equality',
+ 'Protection services',
+ 'Reproductive health',
+ "Women's rights",
+ 'Economic participation',
+ ],
+ ],
+ ];
+ /** @var \Drupal\ncms_tags\TagMigration $tag_migration */
+ $tag_migration = \Drupal::service('ncms_tags.tag_migration');
+ $not_migrated = [];
+ foreach (array_keys($themes) as $parent_key => $theme) {
+ $parent_term = $tag_migration->createTag('theme', $theme, $parent_key);
+ $result = $tag_migration->migrateTag($parent_term, !empty($themes[$theme]['alternatives']) ? $themes[$theme]['alternatives'] : []);
+ if ($result === FALSE) {
+ $not_migrated[] = $theme;
+ }
+ $children = array_key_exists('children', $themes[$theme]) ? $themes[$theme]['children'] : $themes[$theme];
+ foreach ($children as $child_key => $child_tag) {
+ $tag_migration->createTag('theme', $child_tag, $child_key, $parent_term);
+ }
}
-
- /** @var \Drupal\paragraphs\ParagraphInterface[] $paragraphs */
- $paragraphs = $paragraph_storage->loadByProperties([
- 'type' => ['document_chapter'],
- 'field_tags' => $tag_ids,
- ]);
- foreach ($paragraphs as $paragraph) {
- $tags = $paragraph->get('field_tags')->getValue();
- $tags = array_filter($tags, function ($_tag) use ($tag_ids) {
- return !in_array($_tag['target_id'], $tag_ids);
- });
- $paragraph->get('field_tags')->setValue($tags);
- $paragraph->get($field_name)->setValue($term);
- $paragraph->setNewRevision(FALSE);
- $paragraph->setSyncing(TRUE);
- $paragraph->save();
+ if (count($not_migrated)) {
+ return t('Processed @processed theme tags, skipped migration for these tags: @not_migrated', [
+ '@processed' => count($themes),
+ '@not_migrated' => implode(', ', $not_migrated),
+ ]);
}
-
- /** @var \Drupal\taxonomy\TermInterface[] $content_spaces */
- $content_spaces = $term_storage->loadByProperties([
- 'vid' => ['content_space'],
- 'field_major_tags' => $tag_ids,
- ]);
- foreach ($content_spaces as $content_space) {
- $tags = $content_space->get('field_major_tags')->getValue();
- $tags = array_filter($tags, function ($_tag) use ($tag_ids) {
- return !in_array($_tag['target_id'], $tag_ids);
- });
- $tags[] = [
- 'target_id' => $term->id(),
- ];
- $content_space->get('field_major_tags')->setValue($tags);
- $content_space->setNewRevision(FALSE);
- $content_space->setSyncing(TRUE);
- $content_space->save();
+ else {
+ return t('Processed @processed theme tags', [
+ '@processed' => count($themes),
+ ]);
}
+}
- if ($tag) {
- $tag->delete();
+/**
+ * Migrate some special tags into the new taxonomies.
+ */
+function ncms_tags_deploy_6_migrate_special_terms(&$sandbox) {
+ /** @var \Drupal\ncms_tags\TagMigration $tag_migration */
+ $tag_migration = \Drupal::service('ncms_tags.tag_migration');
+ $term_storage = \Drupal::entityTypeManager()->getStorage('taxonomy_term');
+
+ $gho_tags = [
+ 'GHO 2022' => [
+ 'document_type' => 'GHO',
+ 'year' => '2022',
+ ],
+ 'GHO 2023' => [
+ 'document_type' => 'GHO',
+ 'year' => '2023',
+ ],
+ 'GHO 2024' => [
+ 'document_type' => 'GHO',
+ 'year' => '2024',
+ ],
+ ];
+ foreach ($gho_tags as $tag => $fields) {
+ /** @var \Drupal\taxonomy\TermInterface $tag_term */
+ $tag_terms = $term_storage->loadByProperties([
+ 'vid' => 'major_tags',
+ 'name' => $tag,
+ ]);
+ foreach ($fields as $vid => $value) {
+ $term = $tag_migration->createTag($vid, $value);
+ $tag_migration->migrateTermReferences($tag_terms, $term);
+ }
+ foreach ($tag_terms as $tag_term) {
+ $tag_term->delete();
+ }
}
- foreach ($alternative_terms as $term) {
- $term->delete();
+}
+
+/**
+ * Delete some obsolete tags.
+ */
+function ncms_tags_deploy_7_delete_obsolete_tags(&$sandbox) {
+ $term_storage = \Drupal::entityTypeManager()->getStorage('taxonomy_term');
+ $obsolete_tags = [
+ 'Achievements',
+ 'Dashboard',
+ 'Delivering Better',
+ 'Flash Appeal Template',
+ 'Foreword',
+ 'Global Trends',
+ 'HNO template',
+ 'Humanitarian Action',
+ 'Introduction',
+ 'Methodology',
+ 'Regional',
+ 'Regional Overview',
+ 'Response Plans',
+ 'Section 1: Global Trends',
+ 'Section 2: Response Plans',
+ 'Section 3: Delivering Better',
+ 'Snapshot',
+ 'Standalone',
+ ];
+ foreach ($obsolete_tags as $tag) {
+ $tag_terms = $term_storage->loadByProperties([
+ 'vid' => 'major_tags',
+ 'name' => $tag,
+ ]);
+ foreach ($tag_terms as $tag_term) {
+ $tag_term->delete();
+ }
}
- return TRUE;
}
diff --git a/html/modules/custom/ncms_tags/ncms_tags.libraries.yml b/html/modules/custom/ncms_tags/ncms_tags.libraries.yml
new file mode 100644
index 00000000..6d4ea9eb
--- /dev/null
+++ b/html/modules/custom/ncms_tags/ncms_tags.libraries.yml
@@ -0,0 +1,4 @@
+input.computed_tags:
+ css:
+ theme:
+ css/input.computed_tags.css: {}
diff --git a/html/modules/custom/ncms_tags/ncms_tags.module b/html/modules/custom/ncms_tags/ncms_tags.module
index ed25d623..f35e74e1 100644
--- a/html/modules/custom/ncms_tags/ncms_tags.module
+++ b/html/modules/custom/ncms_tags/ncms_tags.module
@@ -25,26 +25,29 @@ function ncms_tags_entity_base_field_info_alter(&$fields, EntityTypeInterface $e
* Support for computed tags field on articles and documents.
*/
function ncms_tags_computed_field_field_computed_tags_value_alter(&$value, $context) {
+ /** @var \Drupal\ncms_tags\CommonTaxonomyService $common_taxonomies */
+ $common_taxonomies = \Drupal::service('ncms_tags.common_taxonomies');
$entity = $context['entity'];
- $supported_fields = [
- 'field_country',
- 'field_document_type',
- 'field_year',
- 'field_tags',
- ];
+ $supported_fields = $common_taxonomies->getCommonTaxonomyFieldNames();
$tags = [];
$term_storage = \Drupal::entityTypeManager()->getStorage('taxonomy_term');
- foreach ($entity->toArray() as $field_name => $field) {
- if (!in_array($field_name, $supported_fields)) {
+ $entity_data = $entity->toArray();
+ // Iterating over $supported_fields instead of $entity_data to assure tags
+ // are ordered by vocabulary first. This is not necessarily important, but
+ // make things look more consistent in the backend.
+ foreach ($supported_fields as $field_name) {
+ if (empty($entity_data[$field_name])) {
continue;
}
+ $field = $entity_data[$field_name];
$tids = array_map(function ($value) {
return $value['target_id'];
}, $field);
$terms = $term_storage->loadMultiple($tids);
- $tags = array_merge($tags, array_map(function (TermInterface $term) {
+ $field_tags = array_map(function (TermInterface $term) {
return $term->getName();
- }, $terms));
+ }, $terms);
+ $tags = array_merge($tags, $field_tags);
}
$value = implode(',', $tags);
}
diff --git a/html/modules/custom/ncms_tags/ncms_tags.services.yml b/html/modules/custom/ncms_tags/ncms_tags.services.yml
new file mode 100644
index 00000000..179eb4d3
--- /dev/null
+++ b/html/modules/custom/ncms_tags/ncms_tags.services.yml
@@ -0,0 +1,6 @@
+services:
+ ncms_tags.common_taxonomies:
+ class: Drupal\ncms_tags\CommonTaxonomyService
+ ncms_tags.tag_migration:
+ class: Drupal\ncms_tags\TagMigration
+ arguments: ['@entity_type.manager', '@ncms_tags.common_taxonomies']
\ No newline at end of file
diff --git a/html/modules/custom/ncms_tags/ncms_tags.views.inc b/html/modules/custom/ncms_tags/ncms_tags.views.inc
new file mode 100644
index 00000000..a8a7756e
--- /dev/null
+++ b/html/modules/custom/ncms_tags/ncms_tags.views.inc
@@ -0,0 +1,23 @@
+ t('Display content based on the computed tags. (Active tags)'),
+ 'group' => t('Content'),
+ 'real field' => 'field_computed_tags_value',
+ 'filter' => [
+ 'title' => t('Computed tags (active tags)'),
+ 'id' => 'computed_tags_active_tags',
+ ],
+ ];
+ return $data;
+}
diff --git a/html/modules/custom/ncms_tags/src/CommonTaxonomyService.php b/html/modules/custom/ncms_tags/src/CommonTaxonomyService.php
new file mode 100644
index 00000000..3adbacf6
--- /dev/null
+++ b/html/modules/custom/ncms_tags/src/CommonTaxonomyService.php
@@ -0,0 +1,62 @@
+ 'field_document_type',
+ 'country' => 'field_country',
+ 'year' => 'field_year',
+ 'month' => 'field_month',
+ 'theme' => 'field_theme',
+ ];
+ }
+
+ /**
+ * Get the field name for the given taxonomy bundle.
+ *
+ * @param string $bundle
+ * The bundle name, that's the vid of the taxonomy.
+ *
+ * @return string|null
+ * The field name for the given bundle.
+ *
+ * @todo This should probably throw an expception instead of returning NULL.
+ */
+ public function getFieldNameForTaxonomyBundle($bundle) {
+ $map = $this->getCommonTaxonomyBundleFieldMap();
+ return $map[$bundle] ?? NULL;
+ }
+
+ /**
+ * Get an array of field names for the common taxonomies.
+ *
+ * @return string[]
+ * An array of field names.
+ */
+ public function getCommonTaxonomyFieldNames() {
+ return array_values($this->getCommonTaxonomyBundleFieldMap());
+ }
+
+ /**
+ * Get an array of bundle names for the common taxonomies.
+ *
+ * @return string[]
+ * An array of taxonomy vids.
+ */
+ public function getCommonTaxonomyBundles() {
+ return array_keys($this->getCommonTaxonomyBundleFieldMap());
+ }
+
+}
diff --git a/html/modules/custom/ncms_tags/src/Plugin/views/filter/ComputedTagsActiveTagsFilter.php b/html/modules/custom/ncms_tags/src/Plugin/views/filter/ComputedTagsActiveTagsFilter.php
new file mode 100644
index 00000000..97f929b7
--- /dev/null
+++ b/html/modules/custom/ncms_tags/src/Plugin/views/filter/ComputedTagsActiveTagsFilter.php
@@ -0,0 +1,184 @@
+entityTypeManager = $container->get('entity_type.manager');
+ $instance->commonTaxonomies = $container->get('ncms_tags.common_taxonomies');
+ return $instance;
+ }
+
+ /**
+ * Options form subform for setting options.
+ *
+ * This should be overridden by all child classes and it must
+ * define $form['value']
+ *
+ * @see buildOptionsForm()
+ */
+ protected function valueForm(&$form, FormStateInterface $form_state) {
+ // Only present a checkbox for the exposed filter itself.
+ if ($form_state->get('exposed')) {
+ $form['value'] = [
+ '#type' => 'entity_autocomplete_active_tags',
+ '#target_type' => 'taxonomy_term',
+ '#tags' => TRUE,
+ '#default_value' => NULL,
+ '#selection_handler' => 'default',
+ '#selection_settings' => [
+ 'target_bundles' => $this->commonTaxonomies->getCommonTaxonomyBundles(),
+ ],
+ '#match_limit' => 10,
+ '#min_length' => 0,
+ '#delimiter' => '',
+ '#style' => 'rectangle',
+ '#show_entity_id' => FALSE,
+ '#element_validate' => [[$this, 'elementValidate']],
+ '#after_build' => [[self::class, 'afterBuild']],
+ '#attributes' => ['class' => [Html::getClass('computed_tags_filter')]],
+ '#attached' => ['library' => ['ncms_tags/input.computed_tags']],
+ ];
+ }
+ }
+
+ /**
+ * Add this filter to the query.
+ *
+ * Due to the nature of fapi, the value and the operator have an unintended
+ * level of indirection. You will find them in $this->operator
+ * and $this->value respectively.
+ */
+ public function query() {
+ if (empty($this->value)) {
+ return;
+ }
+ $this->ensureMyTable();
+
+ $tids = array_filter(array_map(function ($item) {
+ return $item['target_id'];
+ }, $this->value));
+ /** @var \Drupal\taxonomy\TermInterface[] $terms */
+ $terms = $this->entityTypeManager->getStorage('taxonomy_term')->loadMultiple($tids);
+
+ $bundle_field_map = $this->commonTaxonomies->getCommonTaxonomyBundleFieldMap();
+ foreach ($terms as $term) {
+ if (empty($bundle_field_map[$term->bundle()])) {
+ continue;
+ }
+ $table_name = 'node__' . $bundle_field_map[$term->bundle()];
+ $field_name = $bundle_field_map[$term->bundle()] . '_target_id';
+ $table_alias = $this->query->ensureTable($table_name);
+ if (!$table_alias) {
+ continue;
+ }
+ $this->query->addWhere($this->options['group'], ($this->query->getConnection()->condition('OR'))
+ ->condition("$table_alias.$field_name", $term->id()));
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function adminSummary() {
+ if (!empty($this->options['exposed'])) {
+ return $this->t('exposed');
+ }
+ }
+
+ /**
+ * Validates and processes the autocomplete element values.
+ *
+ * @param array $element
+ * The form element.
+ * @param \Drupal\Core\Form\FormStateInterface $form_state
+ * The form state object.
+ *
+ * @throws \JsonException
+ */
+ public static function elementValidate(array $element, FormStateInterface $form_state): void {
+ $value = $form_state->getValue($element['#parents']);
+ if ($value && ($items = Json::decode($value))) {
+ $formatted_items = self::formattedItems($items);
+ if (!empty($formatted_items)) {
+ $form_state->setValue($element['#parents'], $formatted_items);
+ }
+ }
+ }
+
+ /**
+ * Formats filter items.
+ *
+ * @param array $items
+ * The filter items.
+ *
+ * @return array
+ * The formatted filter items.
+ */
+ protected static function formattedItems(array $items): array {
+ foreach ($items as $item) {
+ $formatted_items[] = [
+ 'target_id' => $item['entity_id'],
+ 'label' => $item['label'],
+ ];
+ }
+
+ return $formatted_items ?? [];
+ }
+
+ /**
+ * Form API after build callback for the autocomplete input element.
+ */
+ public static function afterBuild(array $element, FormStateInterface $form_state) {
+ // By default, Drupal sets the maxlength to 128 if the property isn't
+ // specified, but since the limit isn't useful in some cases,
+ // we unset the property.
+ unset($element['#maxlength']);
+ return $element;
+ }
+
+}
diff --git a/html/modules/custom/ncms_tags/src/TagMigration.php b/html/modules/custom/ncms_tags/src/TagMigration.php
new file mode 100644
index 00000000..b6fb2cea
--- /dev/null
+++ b/html/modules/custom/ncms_tags/src/TagMigration.php
@@ -0,0 +1,261 @@
+entityTypeManager = $entity_type_manager;
+ $this->commonTaxonomies = $common_taxonomies;
+ }
+
+ /**
+ * Create a term.
+ *
+ * @param string $vid
+ * The machine name of the vocabulary.
+ * @param string $term_name
+ * The term name.
+ * @param int $weight
+ * The weight of the term in the vocabulary.
+ * @param \Drupal\taxonomy\TermInterface $parent_term
+ * An optional parent term object.
+ *
+ * @return \Drupal\taxonomy\TermInterface
+ * The created term.
+ */
+ public function createTag($vid, $term_name, $weight = NULL, TermInterface $parent_term = NULL) {
+ $term_storage = $this->entityTypeManager->getStorage('taxonomy_term');
+ $terms = $term_storage->loadByProperties(array_filter([
+ 'vid' => $vid,
+ 'name' => $term_name,
+ 'weight' => $weight,
+ 'parent' => $parent_term?->id(),
+ ]));
+ if (!empty($terms)) {
+ return reset($terms);
+ }
+ /** @var \Drupal\taxonomy\TermInterface $term */
+ $term = $term_storage->create(array_filter([
+ 'vid' => $vid,
+ 'name' => $term_name,
+ 'weight' => $weight,
+ 'parent' => $parent_term?->id(),
+ ]));
+ $term->save();
+ return $term;
+ }
+
+ /**
+ * Migrate the given term into field name.
+ *
+ * @param \Drupal\taxonomy\TermInterface $term
+ * The term object to migrate.
+ * @param string[] $alternative_names
+ * An optional list of alternative names for the given term.
+ * @param bool $cleanup_tags
+ * Whether the tags should be cleaned up after migration.
+ *
+ * @return bool
+ * The result state of the operation.
+ */
+ public function migrateTag(TermInterface $term, $alternative_names = [], $cleanup_tags = TRUE) {
+ $term_storage = $this->entityTypeManager->getStorage('taxonomy_term');
+
+ /** @var \Drupal\taxonomy\TermInterface $tag */
+ $tags = $term_storage->loadByProperties([
+ 'vid' => 'major_tags',
+ 'name' => array_merge([$term->getName()], $alternative_names),
+ ]);
+ if (empty($tags)) {
+ return FALSE;
+ }
+ $this->migrateTermReferences($tags, $term);
+
+ if ($cleanup_tags) {
+ foreach ($tags as $tag) {
+ $tag->delete();
+ }
+ }
+ return TRUE;
+ }
+
+ /**
+ * Migrate term references for the given source tags and field name.
+ *
+ * @param \Drupal\taxonomy\TermInterface[] $source_tags
+ * The term objects to migrate.
+ * @param \Drupal\taxonomy\TermInterface $term
+ * The target term object that the field should reference.
+ */
+ public function migrateTermReferences(array $source_tags, $term) {
+ $tag_ids = array_map(function (TermInterface $_term) {
+ return $_term->id();
+ }, $source_tags);
+
+ $this->migrateNodeTerms($tag_ids, $term);
+ $this->migrateParagraphTerms($tag_ids, $term);
+ $this->migrateContentSpaceTerms($tag_ids, $term);
+ }
+
+ /**
+ * Migrate node terms from the deprecated free tag field to a dedicated one.
+ *
+ * @param int[] $tag_ids
+ * An array of tag ids.
+ * @param \Drupal\taxonomy\TermInterface $term
+ * The term to migrate.
+ */
+ private function migrateNodeTerms(array $tag_ids, TermInterface $term) {
+ $field_name = $this->commonTaxonomies->getFieldNameForTaxonomyBundle($term->bundle());
+ /** @var \Drupal\ncms_ui\Entity\Storage\ContentStorage $node_storage */
+ $node_storage = $this->entityTypeManager->getStorage('node');
+ /** @var \Drupal\node\NodeInterface[] $nodes */
+ $nodes = $node_storage->loadByProperties([
+ 'type' => ['article', 'document'],
+ 'field_tags' => $tag_ids,
+ ]);
+ foreach ($nodes as $node) {
+ $this->removeTagIdsFromField($node, 'field_tags', $tag_ids);
+ $this->addTagToField($node, $field_name, $term);
+ $this->saveEntity($node);
+
+ $revision_ids = $node_storage->revisionIds($node);
+ /** @var \Drupal\node\NodeInterface[] $revisions */
+ $revisions = $node_storage->loadMultipleRevisions($revision_ids);
+ foreach ($revisions as $revision) {
+ $this->removeTagIdsFromField($revision, 'field_tags', $tag_ids);
+ $this->addTagToField($revision, $field_name, $term);
+ $this->saveEntity($revision);
+ }
+ }
+ }
+
+ /**
+ * Migrate paragraph terms from the deprecated free tag field.
+ *
+ * @param int[] $tag_ids
+ * An array of tag ids.
+ * @param \Drupal\taxonomy\TermInterface $term
+ * The term to migrate.
+ */
+ private function migrateParagraphTerms(array $tag_ids, TermInterface $term) {
+ $field_name = $this->commonTaxonomies->getFieldNameForTaxonomyBundle($term->bundle());
+ $paragraph_storage = $this->entityTypeManager->getStorage('paragraph');
+ /** @var \Drupal\paragraphs\ParagraphInterface[] $paragraphs */
+ $paragraphs = $paragraph_storage->loadByProperties([
+ 'type' => ['document_chapter'],
+ 'field_tags' => $tag_ids,
+ ]);
+ foreach ($paragraphs as $paragraph) {
+ $this->removeTagIdsFromField($paragraph, 'field_tags', $tag_ids);
+ $this->addTagToField($paragraph, $field_name, $term);
+ $this->saveEntity($paragraph);
+ }
+ }
+
+ /**
+ * Migrate content space terms from the deprecated free tag field.
+ *
+ * @param int[] $tag_ids
+ * An array of tag ids.
+ * @param \Drupal\taxonomy\TermInterface $term
+ * The term to migrate.
+ */
+ private function migrateContentSpaceTerms(array $tag_ids, TermInterface $term) {
+ $field_name = $this->commonTaxonomies->getFieldNameForTaxonomyBundle($term->bundle());
+ $term_storage = $this->entityTypeManager->getStorage('taxonomy_term');
+ /** @var \Drupal\taxonomy\TermInterface[] $content_spaces */
+ $content_spaces = $term_storage->loadByProperties([
+ 'vid' => ['content_space'],
+ 'field_major_tags' => $tag_ids,
+ ]);
+ foreach ($content_spaces as $content_space) {
+ $this->removeTagIdsFromField($content_space, 'field_major_tags', $tag_ids);
+ $this->addTagToField($content_space, $field_name, $term);
+ $this->saveEntity($content_space);
+ }
+ }
+
+ /**
+ * Remove the given tag ids from an entity field.
+ *
+ * @param \Drupal\Core\Entity\ContentEntityInterface $entity
+ * The entity.
+ * @param string $field_name
+ * The field name.
+ * @param int[] $tag_ids
+ * The tag ids to remove.
+ */
+ private function removeTagIdsFromField(ContentEntityInterface $entity, $field_name, array $tag_ids) {
+ $tags = $entity->get($field_name)->getValue();
+ $tags = array_filter($tags, function ($_tag) use ($tag_ids) {
+ return !in_array($_tag['target_id'], $tag_ids);
+ });
+ $entity->get($field_name)->setValue($tags);
+ }
+
+ /**
+ * Add the given term to an entity field.
+ *
+ * @param \Drupal\Core\Entity\ContentEntityInterface $entity
+ * The entity.
+ * @param string $field_name
+ * The field name.
+ * @param \Drupal\taxonomy\TermInterface $term
+ * The term to add.
+ */
+ private function addTagToField(ContentEntityInterface $entity, $field_name, TermInterface $term) {
+ if (!$entity->hasField($field_name)) {
+ return;
+ }
+ $field_tags = $entity->get($field_name)->getValue();
+ $field_tags = array_filter($field_tags, function ($_tag) use ($term) {
+ return $_tag['target_id'] != $term->id();
+ });
+ $field_tags[] = ['target_id' => $term->id()];
+ $entity->get($field_name)->setValue($field_tags);
+ }
+
+ /**
+ * Save the given entity.
+ *
+ * @param \Drupal\Core\Entity\ContentEntityInterface $entity
+ * The entity to save.
+ */
+ private function saveEntity(ContentEntityInterface $entity) {
+ $entity->setNewRevision(FALSE);
+ $entity->setSyncing(TRUE);
+ $entity->save();
+ }
+
+}
diff --git a/html/modules/custom/ncms_ui/ncms_ui.deploy.php b/html/modules/custom/ncms_ui/ncms_ui.deploy.php
index 96bfdbaf..fa1da803 100644
--- a/html/modules/custom/ncms_ui/ncms_ui.deploy.php
+++ b/html/modules/custom/ncms_ui/ncms_ui.deploy.php
@@ -296,7 +296,7 @@ function ncms_ui_deploy_correct_changed_date(&$sandbox) {
}
/**
- * Set the content space for all users.
+ * Set the collapsible field value for all sub article paragraphs.
*/
function ncms_ui_deploy_set_collapsible_field_value(&$sandbox) {
/** @var \Drupal\paragraphs\ParagraphInterface[] $paragraphs */