8000 minor #10310 Add documentation about children method in DomCrawelr (E… · symfony/symfony-docs@2539e24 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2539e24

Browse files
committed
minor #10310 Add documentation about children method in DomCrawelr (Einenlum)
This PR was squashed before being merged into the master branch (closes #10310). Discussion ---------- Add documentation about children method in DomCrawelr Fixes #10288 Commits ------- cbb057f Add documentation about children method in DomCrawelr
2 parents 09db304 + cbb057f commit 2539e24

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

components/dom_crawler.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,13 @@ Get all the child or parent nodes::
182182
$crawler->filter('body')->children();
183183
$crawler->filter('body > p')->parents();
184184

185+
Get all the direct child nodes matching a CSS selector::
186+
187+
$crawler->filter('body')->children('p.lorem');
188+
189+
.. versionadded:: 4.2
190+
The optional selector in ``children($selector)`` method was introduced in Symfony 4.2.
191+
185192
.. note::
186193

187194
All the traversal methods return a new :class:`Symfony\\Component\\DomCrawler\\Crawler`

0 commit comments

Comments
 (0)
0