Refactor entity rendering with manager pattern

Introduce ChillEntityRenderManager to centralize entity rendering logic, reducing redundancy and improving code organization. Update dependencies and service configuration to support the new manager pattern, enhancing maintainability and flexibility of entity rendering in templates.
This commit is contained in:
2024-09-12 11:17:54 +02:00
parent 0ee91800ab
commit 09563979a2
5 changed files with 93 additions and 48 deletions

View File

@@ -32,11 +32,16 @@ services:
- { name: twig.extension }
Chill\MainBundle\Templating\Entity\ChillEntityRenderExtension:
arguments:
$renders: !tagged_iterator chill.render_entity
tags:
- { name: twig.extension }
Chill\MainBundle\Templating\Entity\ChillEntityRenderManager:
arguments:
$renders: !tagged_iterator chill.render_entity
Chill\MainBundle\Templating\Entity\ChillEntityRenderManagerInterface:
alias: 'Chill\MainBundle\Templating\Entity\ChillEntityRenderManager'
Chill\MainBundle\Templating\Entity\CommentRender:
tags:
- { name: 'chill.render_entity' }