Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
[Emoji][Twig] Addemojify filter#19773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -645,6 +645,37 @@ serialize | ||
| Accepts any data that can be serialized by the :doc:`Serializer component </serializer>` | ||
| and returns a serialized string in the specified ``format``. | ||
| .. _reference-twig-filter-emojify: | ||
| emojify | ||
| ~~~~~~~ | ||
| .. versionadded:: 7.1 | ||
| The ``emojify`` filter was introduced in Symfony 7.1. | ||
| .. code-block:: twig | ||
| {{ text|emojify(catalog = null) }} | ||
| ``text`` | ||
| **type**: ``string`` | ||
| ``catalog`` *(optional)* | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. When is null, default extension catalog is applied. It's "text" by default in construct. I don't remember what is text behavior, but we should discribe this default ? Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more.
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I created#19919 | ||
| **type**: ``string`` | ``null`` | ||
| The emoji set used to generate the textual representation (``slack``, | ||
| ``github``, ``gitlab``, etc.) | ||
| It transforms the textual representation of an emoji (e.g. ``:wave:``) into the | ||
| actual emoji (👋): | ||
| .. code-block:: twig | ||
| {{ ':+1:'|emojify }} {# renders: 👍 #} | ||
| {{ ':+1:'|emojify('github') }} {# renders: 👍 #} | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. What is the rendering of an unknown value for the catalog ? Adding an example could be great ! | ||
| {{ ':thumbsup:'|emojify('gitlab') }} {# renders: 👍 #} | ||
| .. _reference-twig-tags: | ||
| Tags | ||