-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Console] Update some contents of the Tree helper #20942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 7.3
Are you sure you want to change the base?
Conversation
$node = TreeNode::fromValues([ | ||
'Command', | ||
'Controller' => [ | ||
'DefaultController.php', | ||
], | ||
'Kernel.php', | ||
]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TreeNode from multidimensional array should be documented I think.
(I build this array first, and then use it in TreeHelper)
@@ -133,7 +144,11 @@ output of the tree:: | |||
$tree = TreeHelper::createTree($io, $node, [], TreeStyle::compact()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code block must be removed, right ?
@@ -150,7 +165,11 @@ output of the tree:: | |||
└── templates | |||
└── base.html.twig | |||
|
|||
``TreeHelper::createTree($io, $node, [], TreeStyle::box())`` (`details`_) | |||
**Box**: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -235,7 +270,11 @@ output of the tree:: | |||
. templates | |||
. base.html.twig | |||
|
|||
``TreeHelper::createTree($io, $node, [], TreeStyle::rounded())`` (`details`_) | |||
**Rounded**: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Rounded**: | |
**Rounded**:: |
This updates the Tree helper explanation about custom styles to match the same structure as in the Table helper page (see #20941). It also adds a better example of how to create trees programmatically.