Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
javiereguiluz merged 1 commit intosymfony:7.3fromjaviereguiluz:tree_helper
May 8, 2025

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)

javiereguiluz reacted with thumbs up emoji
@@ -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 ?

javiereguiluz reacted with thumbs up emoji
@@ -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

javiereguiluz reacted with thumbs up emoji
@@ -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**::

javiereguiluz reacted with thumbs up emoji
@javiereguiluz
Copy link
MemberAuthor

What a great review! Thanks a lot Antoine. I did all the changes and fixes that you suggested. Thanks!


You can also build part of the tree from an array and then add other nodes::

$node = TreeNode::fromValues($array)
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
$node = TreeNode::fromValues($array)
$node = TreeNode::fromValues($array);

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@OskarStarkOskarStarkOskarStark left review comments

@alamiraultalamiraultalamirault approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
7.3
Development

Successfully merging this pull request may close these issues.

4 participants
@javiereguiluz@OskarStark@alamirault@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp