create visualisation service rers #268

This commit is contained in:
2014-11-10 12:15:10 +01:00
parent 16308d0139
commit 28862bbdb9
9 changed files with 293 additions and 6 deletions

View File

@@ -39,6 +39,7 @@ services:
class: Chill\CustomFieldsBundle\CustomFields\CustomFieldText
arguments:
- "@request_stack"
- "@templating"
tags:
- { name: 'chill.custom_field', type: 'text' }
@@ -68,3 +69,16 @@ services:
- "@request_stack"
tags:
- { name: 'chill.custom_field', type: 'title' }
chill.custom_field.helper:
class: Chill\CustomFieldsBundle\Service\CustomFieldsHelper
arguments:
- "@doctrine.orm.entity_manager"
- "@chill.custom_field.provider"
chill.custom_field.twig.custom_fields_rendering:
class: Chill\CustomFieldsBundle\Templating\Twig\CustomFieldRenderingTwig
calls:
- [setContainer, ["@service_container"]]
tags:
- { name: twig.extension }

View File

@@ -0,0 +1 @@
{{ customField.name(app.request.locale) }}

View File

@@ -0,0 +1,7 @@
<dl class="custom_fields_group_rendering">
<span class="custom_fields_group_name">{{ customFieldsGroup.name(app.request.locale) }}</span>
{% for customField in customFieldsGroup.customFields %}
<dt>{{ chill_custom_field_label(customField) }}</dt>
<dd>{{ chill_custom_field_widget(fields, customField) }}</dd>
{% endfor %}
</dl>

View File

@@ -0,0 +1 @@
{{ text }}