We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3143b3 commit 7e3a49bCopy full SHA for 7e3a49b
components/console/helpers/tree.rst
@@ -49,7 +49,7 @@ Manually Creating a Tree
49
50
You can manually create a tree by creating a new instance of the :class:`Symfony\\Component\\Console\\Helper\\Tree` class and adding nodes to it::
51
52
- use Symfony\Component\Console\Helper\Tree
+ use Symfony\Component\Console\Helper\TreeNode;
53
use Symfony\Component\Console\Helper\TreeHelper;
54
55
$node = TreeNode::fromValues([
@@ -59,9 +59,9 @@ You can manually create a tree by creating a new instance of the :class:`Symfony
59
],
60
'Kernel.php',
61
]);
62
- $node->add('templates', [
63
- 'base.html.twig',
64
- ]);
+ $node->addChild('templates');
+ $node->addChild('tests');
+
65
$tree = TreeHelper::createTree($io, $node);
66
$tree->render();
67
0 commit comments