Skip to content

Commit

Permalink
VACMS-19077: Aging Content for News Spotlight blocks (#19340)
Browse files Browse the repository at this point in the history
* VACMS-19077: Adds expirable content settings for news promo block.

* VACMS-19077: Adds View for expire and warn displays of news promo blocks.

* VACMS-19077: Adds deploy hook to seed expiration dates for news promo blocks.

* VACMS-19077: Adds message stubs for news promos.

* VACMS-19077: Adds View for aging content of news promos.

* VACMS-19077: Adds ECA stubs for news promo aging content notifications.

* VACMS-19077: Updates ECA models for news promos.

* VACMS-19077: Updates message templates for news promo expire and warning messages.

* VACMS-19077: Adds test content generation script for news promo blocks.

* VACMS-19077: Adds missing message template config for warning news promo messages.

* VACMS-19077: Adds theme hooks for news promo email messages.

* VACMS-19077: Re-enables ECA models accidentally disabled.

* VACMS-19077: Renames content generation script.

* VACMS-19077: Adds test for news spotlight block aging content notifications.

* VACMS-19077: Normalize cron event in news spotlight aging content models. This helps with testing.

* VACMS-19077: PHPStan fix.

* VACMS-19077: Enable ECA models for news promo aging content.

* VACMS-19077: Adds missing templates.

* VACMS-19077: Adds uid to generation script.

* VACMS-19077: Adds mailer settings.
  • Loading branch information
dsasser authored Oct 2, 2024
1 parent e32cec7 commit 1147a2a
Show file tree
Hide file tree
Showing 28 changed files with 1,371 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
uuid: 4af75de1-64ad-47b6-90c9-13095971d096
langcode: en
status: true
dependencies:
config:
- field.field.message.aging_content_expired_news_promo.field_expired_date
- field.field.message.aging_content_expired_news_promo.field_title
- message.template.aging_content_expired_news_promo
id: message.aging_content_expired_news_promo.default
targetEntityType: message
bundle: aging_content_expired_news_promo
mode: default
content:
created:
type: datetime_timestamp
weight: 1
region: content
settings: { }
third_party_settings: { }
uid:
type: entity_reference_autocomplete
weight: 0
region: content
settings:
match_operator: CONTAINS
match_limit: 10
size: 60
placeholder: ''
third_party_settings: { }
'#group': advanced
hidden:
field_expired_date: true
field_title: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
uuid: 3433e42f-28e4-480e-86a0-07deeb024617
langcode: en
status: true
dependencies:
config:
- field.field.message.aging_content_warn_news_promo.field_expired_date
- field.field.message.aging_content_warn_news_promo.field_title
- message.template.aging_content_warn_news_promo
id: message.aging_content_warn_news_promo.default
targetEntityType: message
bundle: aging_content_warn_news_promo
mode: default
content:
created:
type: datetime_timestamp
weight: 1
region: content
settings: { }
third_party_settings: { }
uid:
type: entity_reference_autocomplete
weight: 0
region: content
settings:
match_operator: CONTAINS
match_limit: 10
size: 60
placeholder: ''
third_party_settings: { }
'#group': advanced
hidden:
field_expired_date: true
field_title: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
uuid: ea0e707d-42d1-46d2-80b5-db72be0b8f80
langcode: en
status: true
dependencies:
config:
- field.field.message.aging_content_expired_news_promo.field_expired_date
- field.field.message.aging_content_expired_news_promo.field_title
- message.template.aging_content_expired_news_promo
module:
- user
id: message.aging_content_expired_news_promo.default
targetEntityType: message
bundle: aging_content_expired_news_promo
mode: default
content:
field_title:
type: string
label: above
settings:
link_to_entity: false
third_party_settings: { }
weight: 2
region: content
partial_0:
settings: { }
third_party_settings: { }
weight: 0
region: content
partial_1:
settings: { }
third_party_settings: { }
weight: 1
region: content
hidden:
breadcrumbs: true
field_expired_date: true
search_api_excerpt: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
uuid: 60079f54-ed38-4c5e-8686-bf6cddbb73a5
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.message.mail_body
- field.field.message.aging_content_expired_news_promo.field_expired_date
- field.field.message.aging_content_expired_news_promo.field_title
- message.template.aging_content_expired_news_promo
module:
- layout_builder
- user
third_party_settings:
layout_builder:
enabled: false
allow_custom: false
id: message.aging_content_expired_news_promo.mail_body
targetEntityType: message
bundle: aging_content_expired_news_promo
mode: mail_body
content:
partial_1:
weight: 0
region: content
hidden:
breadcrumbs: true
field_expired_date: true
field_title: true
partial_0: true
search_api_excerpt: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
uuid: e3faae33-6dad-49d2-8258-d7098c56fdd4
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.message.mail_subject
- field.field.message.aging_content_expired_news_promo.field_expired_date
- field.field.message.aging_content_expired_news_promo.field_title
- message.template.aging_content_expired_news_promo
module:
- layout_builder
- user
third_party_settings:
layout_builder:
enabled: false
allow_custom: false
id: message.aging_content_expired_news_promo.mail_subject
targetEntityType: message
bundle: aging_content_expired_news_promo
mode: mail_subject
content:
partial_0:
weight: 0
region: content
hidden:
breadcrumbs: true
field_expired_date: true
field_title: true
partial_1: true
search_api_excerpt: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
uuid: 988eaf47-d67f-4b74-8c78-826fbe508410
langcode: en
status: true
dependencies:
config:
- field.field.message.aging_content_warn_news_promo.field_expired_date
- field.field.message.aging_content_warn_news_promo.field_title
- message.template.aging_content_warn_news_promo
module:
- user
id: message.aging_content_warn_news_promo.default
targetEntityType: message
bundle: aging_content_warn_news_promo
mode: default
content:
field_expired_date:
type: string
label: above
settings:
link_to_entity: false
third_party_settings: { }
weight: 1
region: content
field_title:
type: string
label: above
settings:
link_to_entity: false
third_party_settings: { }
weight: 2
region: content
partial_0:
settings: { }
third_party_settings: { }
weight: 0
region: content
partial_1:
settings: { }
third_party_settings: { }
weight: 0
region: content
hidden:
breadcrumbs: true
search_api_excerpt: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
uuid: 1d587650-955f-46a5-accd-fa062d4aec50
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.message.mail_body
- field.field.message.aging_content_warn_news_promo.field_expired_date
- field.field.message.aging_content_warn_news_promo.field_title
- message.template.aging_content_warn_news_promo
module:
- layout_builder
- user
third_party_settings:
layout_builder:
enabled: false
allow_custom: false
id: message.aging_content_warn_news_promo.mail_body
targetEntityType: message
bundle: aging_content_warn_news_promo
mode: mail_body
content:
partial_1:
weight: 0
region: content
hidden:
breadcrumbs: true
field_expired_date: true
field_title: true
partial_0: true
search_api_excerpt: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
uuid: 1a213431-6c36-4598-bc19-fb01fc7917e1
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.message.mail_subject
- field.field.message.aging_content_warn_news_promo.field_expired_date
- field.field.message.aging_content_warn_news_promo.field_title
- message.template.aging_content_warn_news_promo
module:
- layout_builder
- user
third_party_settings:
layout_builder:
enabled: false
allow_custom: false
id: message.aging_content_warn_news_promo.mail_subject
targetEntityType: message
bundle: aging_content_warn_news_promo
mode: mail_subject
content:
partial_0:
weight: 0
region: content
hidden:
breadcrumbs: true
field_expired_date: true
field_title: true
partial_1: true
search_api_excerpt: true
67 changes: 67 additions & 0 deletions config/sync/eca.eca.aging_content_expired_news_promo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
uuid: 1f258e15-5c8f-4645-bc99-42d7c6ab772e
langcode: en
status: true
dependencies:
config:
- views.view.aging_content_content_block
module:
- eca_base
- eca_content
- eca_views
- va_gov_eca
id: aging_content_expired_news_promo
modeller: core
label: 'Aging Content: Expired V2 News Spotlight'
version: ''
weight: -9
events:
eca_base_eca_cron:
plugin: 'eca_base:eca_cron'
label: Cron
configuration:
frequency: '0 0 * * *'
successors:
-
id: eca_views_query
condition: null
content_entity_custom:
plugin: 'content_entity:custom'
label: 'Content Aware Event: Queue Email'
configuration:
event_id: aging_content_expired_news_promo_email
successors:
-
id: create_advancedqueue_job
condition: null
conditions: { }
gateways: { }
actions:
eca_views_query:
plugin: eca_views_query
label: 'Views: Query Expired V2 News Spotlight Promo Results'
configuration:
token_name: results
view_id: aging_content_content_block
display_id: v2_news_spotlight_expired
arguments: ''
successors:
-
id: eca_trigger_content_entity_cus_1
condition: null
create_advancedqueue_job:
plugin: create_advancedqueue_job
label: 'Queue Notification'
configuration:
token_name: job
type: va_gov_aging_content_notification
payload: "template_values:\r\n uid: \"[block_content:revision_user:target_id]\"\r\n template: aging_content_expired_news_promo\r\nvalues:\r\n field_expired_date: \"[block_content:expiration_date:date:html_date]\"\r\n field_title: \"[block_content:info]\"\r\n"
queue: aging_content
successors: { }
eca_trigger_content_entity_cus_1:
plugin: eca_trigger_content_entity_custom_event
label: 'Trigger Custom Event: Queue Notification'
configuration:
event_id: aging_content_expired_news_promo_email
tokens: ''
object: results
successors: { }
Loading

0 comments on commit 1147a2a

Please sign in to comment.