10BC0 Add cmf_find_translation twig function documentation · symfony-cmf/symfony-cmf-docs@5598a40 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 5598a40

Browse files
committed
Add cmf_find_translation twig function documentation
1 parent 9ad008d commit 5598a40

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bundles/core/templating.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ Basic repository operations
3535
* **cmf_path|getPath($document)**: Get the path of the provided document.
3636
* **cmf_parent_path|getParentPath($document)**: Get the path of the parent of the provided document.
3737

38+
.. versionadded:: 1.3.1
39+
* **cmf_find_translation|findTranslation($pathOrDocument, $locale, $fallback = true)**:
40+
Get the document translation for the provided path/document and locale or null if not found.
41+
The document will stay in the last requested locale for the rest of the request.
42+
No publish workflow check is done.
43+
3844
Walking the PHPCR tree
3945
......................
4046

0 commit comments

Comments
 (0)
0