Refatora arquitetura de domínio: field_site_section DER, field_parent_page node-only

- field_site_section migrado de entity_reference para dynamic_entity_reference,
  permitindo referenciar taxonomy_term, user ou event como domínio raiz da página
- field_parent_page restrito a content_page nodes apenas (removidos taxonomy_term/user)
- Update hooks 10011–10013: migração de schema/config, limpeza de referências
  inválidas e correção do tipo do storage field_parent_page para DER
- SectionBreadcrumbBuilder reescrito para usar field_site_section como raiz
- StructuralPagesMenuBlock: queries de domínio via DB direto (evita bug do
  entity query com especificador target_type em campos DER)
- Formulário content_page: pre-fill de field_site_section via query params
  ?domain_type/domain_id ou ?parent_section_type/parent_id; atualiza widget
  #default_value diretamente para refletir o valor na renderização inicial
- Parâmetro de URL parent_type renomeado para parent_section_type

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-20 09:41:17 -03:00
parent 6ab880045a
commit d2ef439227
9 changed files with 894 additions and 370 deletions

View File

@@ -6,24 +6,40 @@ dependencies:
- node.type.content_page
- taxonomy.vocabulary.site_sections
module:
- dynamic_entity_reference
- taxonomy
id: node.content_page.field_site_section
field_name: field_site_section
entity_type: node
bundle: content_page
label: 'Seção do Site'
description: 'For root pages, select the section. For child pages, this field is filled automatically.'
description: 'Para páginas raiz, selecione a seção ou domínio. Para páginas filhas, este campo é preenchido automaticamente a partir do pai.'
required: true
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:taxonomy_term'
handler_settings:
target_bundles:
site_sections: site_sections
sort:
field: name
direction: asc
auto_create: false
field_type: entity_reference
entity_type_ids:
- taxonomy_term
- user
taxonomy_term:
handler: 'default:taxonomy_term'
handler_settings:
target_bundles:
site_sections: site_sections
sort:
field: name
direction: asc
auto_create: false
user:
handler: 'default:user'
handler_settings:
include_anonymous: false
filter:
type: _none
target_bundles: null
sort:
field: name
direction: asc
auto_create: false
field_type: dynamic_entity_reference