Skip to content

Commit 30f7f43

Browse files
authored
Merge pull request #122 from Roshyo/change-twig-filter-name
Change Twig filter name
2 parents 78b9353 + 75fd382 commit 30f7f43

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ This way you will be able to use our plugin right away without risking any data
7777
To display the content of the rich editor field you must call the twig filter:
7878

7979
```twig
80-
{{ content | monsieurbiz_richeditor_render_element }}
80+
{{ content | monsieurbiz_richeditor_render_field }}
8181
```
8282

8383
You can see an example in the [test application](/tests/Application/templates/bundles/SyliusShopBundle/Product/Show/Tabs/Details/_description.html.twig)

UPGRADE-2.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The file `config/packages/monsieurbiz_sylius_rich_editor.yaml` was renamed to `c
1616

1717
## Twig function
1818

19-
The name of the Twig function changed from `mbiz_rich_editor_render` to `monsieurbiz_richeditor_render_element`,
19+
The name of the Twig function changed from `mbiz_rich_editor_render` to `monsieurbiz_richeditor_render_field`,
2020
so make sure to update your templates.
2121

2222
## JavaScript

src/Twig/RichEditorExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function __construct(
5656
public function getFilters()
5757
{
5858
return [
59-
new TwigFilter('monsieurbiz_richeditor_render_element', [$this, 'renderRichEditorField'], ['is_safe' => ['html']]),
59+
new TwigFilter('monsieurbiz_richeditor_render_field', [$this, 'renderRichEditorField'], ['is_safe' => ['html']]),
6060
];
6161
}
6262

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% if product.description is not empty %}
2-
{{ product.description | monsieurbiz_richeditor_render_element }}
2+
{{ product.description | monsieurbiz_richeditor_render_field }}
33
{% else %}
44
{{ 'sylius.ui.no_description'|trans }}.
55
{% endif %}

0 commit comments

Comments
 (0)