@@ -47,9 +47,9 @@ Walking the PHPCR tree
47
47
| | | $class = null, | set, this limits how deep below ``$current `` the tree is walked. |
48
48
| | | $anchor = null | |
49
49
+-----------------------+---------------------+----------------------+--------------------------------------------------------------------------+
50
- | cmf_prev_linkable | getPrevLinkable | $current, | Get the previous document that has a route associated. This is a |
51
- | | | $anchor = null, | shortcut for `` getPrev `` with the `` $class `` filter set to |
52
- | | | $depth = null, | `` Symfony\Cmf\Component\Routing\RouteReferrersReadInterface ``. |
50
+ | cmf_prev_linkable | getPrevLinkable | $current, | Get the previous document that can be linked to, according to the |
51
+ | | | $anchor = null, | `` isLinkable `` method below. |
52
+ | | | $depth = null, | |
53
53
| | | $ignoreRole = false | |
54
54
+-----------------------+---------------------+----------------------+--------------------------------------------------------------------------+
55
55
| cmf_next | getNext | $current, | Get the next sibling document from ``$current `` (a document or a path) |
@@ -58,9 +58,9 @@ Walking the PHPCR tree
58
58
| | | $ignoreRole = false, | |
59
59
| | | $class = null | |
60
60
+-----------------------+---------------------+----------------------+--------------------------------------------------------------------------+
61
- | cmf_next_linkable | getNextLinkable | $current, | Get the next document that has a route associated. This is a shortcut |
62
- | | | $anchor = null, | for `` getNext `` with the `` $class `` filter set to |
63
- | | | $depth = null, | `` Symfony\Cmf\Component\Routing\RouteReferrersReadInterface ``. |
61
+ | cmf_next_linkable | getNextLinkable | $current, | Get the next document that can be linked to, according to the |
62
+ | | | $anchor = null, | `` isLinkable `` method below. |
63
+ | | | $depth = null, | |
64
64
| | | $ignoreRole = false | |
65
65
+-----------------------+---------------------+----------------------+--------------------------------------------------------------------------+
66
66
| cmf_child | getChild | $parent, $name | Get child document named ``$name `` of the specified parent. The parent |
@@ -73,9 +73,9 @@ Walking the PHPCR tree
73
73
| | | $ignoreRole = false, | |
74
74
| | | $class = null | |
75
75
+-----------------------+---------------------+----------------------+--------------------------------------------------------------------------+
76
- | cmf_linkable_children | getLinkableChildren | $parent, | Get all children of the parent that have a route associated. A shortcut |
77
- | | | $limit = false, | for `` getChildren `` with the `` $class `` filter set to |
78
- | | | $offset = false, | `` Symfony\Cmf\Component\Routing\RouteReferrersReadInterface ``. |
76
+ | cmf_linkable_children | getLinkableChildren | $parent, | Get all children of `` $ parent`` that can be linked to, according to the |
77
+ | | | $limit = false, | `` isLinkable `` method below. |
78
+ | | | $offset = false, | |
79
79
| | | $filter = null, | |
80
80
| | | $ignoreRole = false | |
81
81
+-----------------------+---------------------+----------------------+--------------------------------------------------------------------------+
@@ -94,6 +94,12 @@ Helper methods
94
94
| | | $includeFallbacks = | ``true ``, all fallback locales are provided as well, even if no |
95
95
| | | false | translation in that language exists. |
96
96
+-----------------------+---------------------+----------------------+--------------------------------------------------------------------------+
97
+ | cmf_is_linkable | isLinkable | $document | Check if the provided object can be used to generate a URL. If this |
98
+ | | | | check returns true, it should be save to pass it to ``path `` or ``url ``. |
99
+ | | | | An object is considered linkable if it either *is * an instance of |
100
+ | | | | ``Route `` or implements the ``RouteReferrersReadInterface `` *and * |
101
+ | | | | actually returns a route. |
102
+ +-----------------------+---------------------+----------------------+--------------------------------------------------------------------------+
97
103
| cmf_is_published | isPublished | $document | Check with the publish workflow if the provided object is published. See |
98
104
| | | | also :ref:`cmf_is_published <bundle-core-publish-workflow-twig_function>`|
99
105
| | | | for an example. |
0 commit comments