Skip to content

[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

Open
wants to merge 1 commit into
base: 7.3
Choose a base branch
from

Conversation

javiereguiluz
Copy link
Member

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.

Comment on lines -108 to -114
$node = TreeNode::fromValues([
'Command',
'Controller' => [
'DefaultController.php',
],
'Kernel.php',
]);
Copy link
Contributor

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());
Copy link
Contributor

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**:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Box**:
**Box**::

Without:

image

@@ -235,7 +270,11 @@ output of the tree::
. templates
. base.html.twig

``TreeHelper::createTree($io, $node, [], TreeStyle::rounded())`` (`details`_)
**Rounded**:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Rounded**:
**Rounded**::

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants