Julien Fastré 5c67a9098e allow delegation of block rendering
ref #12

In a template, you can now allow rendering of a block from other bundle.

The layout template must explicitly call the rendering of other block,
with the twig function

```
chill_delegated_block('block_name', { 'array' : 'with context' } )
```

This will launch an event
`Chill\MainBundle\Templating\Events\DelegatedBlockRenderingEvent` with
the event's name 'chill_block.block_name'.

You may add content to the page using the function
`DelegatedBlockRenderingEvent::addContent`.
2016-03-14 22:45:04 +01:00

144 lines
4.9 KiB
YAML

parameters:
# cl_chill_main.example.class: Chill\MainBundle\Example
services:
chill.main.routes_loader:
class: Chill\MainBundle\Routing\Loader\ChillRoutesLoader
arguments:
- "%chill_main.routing.resources%"
tags:
- { name: routing.loader }
chill.main.menu_composer:
class: Chill\MainBundle\Routing\MenuComposer
#must be set in function to avoid circular reference with chill.main.twig.chill_menu
calls:
- [setContainer, ["@service_container"]]
chill.main.twig.chill_menu:
class: Chill\MainBundle\Routing\MenuTwig
arguments:
- "@chill.main.menu_composer"
calls:
- [setContainer, ["@service_container"]]
tags:
- { name: twig.extension }
twig_intl:
class: Twig_Extensions_Extension_Intl
tags:
- { name: twig.extension }
chill.main.form.type.translatable.string:
class: Chill\MainBundle\Form\Type\TranslatableStringFormType
arguments:
- "%chill_main.available_languages%"
#- "%framework.translator.fallback%"
- "@translator.default"
tags:
- { name: form.type, alias: translatable_string }
chill.main.helper.translatable_string:
class: Chill\MainBundle\Templating\TranslatableStringHelper
arguments:
- "@request_stack"
- "@translator.default"
chill.main.twig.translatable_string:
class: Chill\MainBundle\Templating\TranslatableStringTwig
calls:
- [ setContainer, ["@service_container"]]
tags:
- { name: twig.extension }
chill.main.twig.delegated_block:
class: Chill\MainBundle\Templating\DelegatedBlockRenderingTwig
arguments:
- "@event_dispatcher"
tags:
- { name: twig.extension }
chill.main.twig.csv_cell:
class: Chill\MainBundle\Templating\CSVCellTwig
tags:
- { name: twig.extension }
chill.main.form.type.select2choice:
class: Chill\MainBundle\Form\Type\Select2ChoiceType
tags:
- {name: form.type, alias: select2_choice}
chill.main.form.type.select2entity:
class: Chill\MainBundle\Form\Type\Select2EntityType
tags:
- {name: form.type, alias: select2_entity }
chill.main.form.type.select2country:
class: Chill\MainBundle\Form\Type\Select2CountryType
arguments:
- "@request_stack"
- "@doctrine.orm.entity_manager"
tags:
- { name: form.type, alias: select2_chill_country }
chill.main.form.type.select2language:
class: Chill\MainBundle\Form\Type\Select2LanguageType
arguments:
- "@request_stack"
- "@doctrine.orm.entity_manager"
tags:
- { name: form.type, alias: select2_chill_language }
chill.main.form.type.center:
class: Chill\MainBundle\Form\Type\CenterType
arguments:
- "@security.token_storage"
- "@chill.main.form.data_transformer.center_transformer"
tags:
- { name: form.type, alias: center }
chill.main.form.data_transformer.center_transformer:
class: Chill\MainBundle\Form\Type\DataTransformer\CenterTransformer
arguments:
- "@doctrine.orm.entity_manager"
chill.main.search_provider:
class: Chill\MainBundle\Search\SearchProvider
chill.main.timeline_builder:
class: Chill\MainBundle\Timeline\TimelineBuilder
arguments:
- "@doctrine.orm.entity_manager"
calls:
- [ setContainer, ["@service_container"]]
chill.main.security.authorization.helper:
class: Chill\MainBundle\Security\Authorization\AuthorizationHelper
arguments:
- "@security.role_hierarchy"
chill.main.role_provider:
class: Chill\MainBundle\Security\RoleProvider
chill.main.form.type.composed_role_scope:
class: Chill\MainBundle\Form\Type\ComposedRoleScopeType
arguments:
- "@chill.main.helper.translatable_string"
- "@chill.main.role_provider"
tags:
- { name: form.type, alias: composed_role_scope }
chill.main.validator.role_scope_scope_presence:
class: Chill\MainBundle\Validation\Validator\RoleScopeScopePresence
arguments:
- "@chill.main.role_provider"
- "@logger"
- "@translator"
tags:
- { name: validator.constraint_validator, alias: 'role_scope_scope_presence' }
chill.main.form.type.postal_code_type:
class: Chill\MainBundle\Form\Type\PostalCodeType
arguments:
- "@chill.main.helper.translatable_string"
tags:
- { name: form.type }