8000 Merge pull request #769 from EmmanuelVella/cmf_find_translation · symfony-cmf/symfony-cmf-docs@671e610 · 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 671e610

Browse files
authored
Merge pull request #769 from EmmanuelVella/cmf_find_translation
Add cmf_find_translation twig function documentation
2 parents 9ad008d + 8ea2576 commit 671e610

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bundles/core/templating.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,19 @@ Basic repository operations
2929

3030
* **cmf_find|find(path)**: Get the document for the provided path or null if not found.
3131
No publish workflow check is done.
32+
* **cmf_find_translation|findTranslation($pathOrDocument, $locale, $fallback = true)**: Get the document translation
33+
for the provided path/document and locale or null if not found. The document will stay in the last requested locale
34+
for the rest of the request.
35+
No publish workflow check is done.
3236
* **cmf_find_many|findMany($paths, $limit = false, $offset = false, $ignoreRole = false, $class = false)**:
3337
Get a list of documents for the provided paths.
3438
* **cmf_nodename|getNodeName($document)**: Get the node name of the provided document.
3539
* **cmf_path|getPath($document)**: Get the path of the provided document.
3640
* **cmf_parent_path|getParentPath($document)**: Get the path of the parent of the provided document.
3741

42+
.. versionadded:: 1.3.1
43+
The cmf_find_translation twig function has been added in version 1.3.1 of the CMF CoreBundle.
44+
3845
Walking the PHPCR tree
3946
......................
4047

0 commit comments

Comments
 (0)
0