Making your hookables configurable
Example
{#
# we assume there is a `form` variable holding a `FormView` instance passed
# from the controller
#}
<div class="container">
{{ form_start(form) }}
{{ form_errors(form) }}
{{ form_widget(form._token) }}
{% raw %}
{% hook 'index.form' with { form } %}
{% endraw %}
{{ form_end(form, {render_rest: false}) }}
</div><div class="{{ hookable_metadata.configuration.attr.class|default("field) }}">
{{ form_row(
hookable_metadata.context.form[hookable_metadata.configuration.field_name]
) }}
</div>Last updated
Was this helpful?
