Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbf5d0c3

Browse files
committed
minor#16769 [Twig] Update twig_extension.rst (CJDennis)
This PR was merged into the 4.4 branch.Discussion----------[Twig] Update twig_extension.rstImprove grammar<!--If your pull request fixes a BUG, use the oldest maintained branch that containsthe bug (seehttps://symfony.com/releases for the list of maintained branches).If your pull request documents a NEW FEATURE, use the same Symfony branch wherethe feature was introduced (and `6.x` for features of unreleased versions).-->Commits-------c935226 Update twig_extension.rst
2 parents1273311 +c935226 commitbf5d0c3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎templating/twig_extension.rst‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
How to Write a custom Twig Extension
55
====================================
66

7-
`Twig Extensions`_ allowto createcustom functions, filters and more to use
8-
themin your Twig templates. Before writing your own Twig extension, check if
7+
`Twig Extensions`_ allowthe creation ofcustom functions, filters, and more to use
8+
in your Twig templates. Before writing your own Twig extension, check if
99
the filter/function that you need is already implemented in:
1010

1111
* The `default Twig filters and functions`_;
@@ -16,7 +16,7 @@ Create the Extension Class
1616
--------------------------
1717

1818
Suppose you want to create a new filter called ``price`` that formats a number
19-
into money:
19+
as currency:
2020

2121
..code-block::twig
2222
@@ -117,7 +117,7 @@ them) performance is not affected. However, if extensions define lots of complex
117117
dependencies (e.g. those making database connections), the performance loss can
118118
be significant.
119119

120-
That's why Twig allowsto decouple the extension definition from its
120+
That's why Twig allowsdecoupling the extension definition from its
121121
implementation. Following the same example as before, the first change would be
122122
to remove the ``formatPrice()`` method from the extension and update the PHP
123123
callable defined in ``getFilters()``::

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp