mirror of
https://gitlab.unicamp.br/infimecc_drupal11_modules/structural_pages.git
synced 2026-03-10 02:17:42 -03:00
Replace hardcoded entity type checks with a plugin-based architecture using PHP 8 attributes. This allows adding new parent entity types without modifying core module files. Changes: - Add ParentEntityHandler attribute, interface, base class, and manager - Create built-in handlers for taxonomy_term, user, and node entities - Move Group support to site_structure_group submodule (fixes class not found error when Group module is not installed) - Refactor SiteStructureSettingsForm to use handler manager - Refactor SiteStructureMenuBlock to use handler manager - Refactor SectionBreadcrumbBuilder to use handler manager - Update site_structure.module to use handler manager for clearsSiteSection - Update documentation and translations Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
17 lines
524 B
YAML
17 lines
524 B
YAML
services:
|
|
plugin.manager.parent_entity_handler:
|
|
class: Drupal\site_structure\ParentEntityHandler\ParentEntityHandlerManager
|
|
arguments:
|
|
- '@container.namespaces'
|
|
- '@cache.discovery'
|
|
- '@module_handler'
|
|
- '@entity_type.manager'
|
|
|
|
site_structure.breadcrumb.section:
|
|
class: Drupal\site_structure\Breadcrumb\SectionBreadcrumbBuilder
|
|
arguments:
|
|
- '@entity_type.manager'
|
|
- '@plugin.manager.parent_entity_handler'
|
|
tags:
|
|
- { name: breadcrumb_builder, priority: 100 }
|