Copied!

The TreeHelper class provides methods to display tree-like structures.

CloneableFinalIterable
Methods
public static createTree(Symfony\Component\Console\Output\OutputInterface $output, Symfony\Component\Console\Helper\TreeNode|string|?null $root = NULL, iterable $values = [], ?Symfony\Component\Console\Helper\TreeStyle $style = NULL) : self
public current() : Symfony\Component\Console\Helper\TreeNode
public getChildren() : RecursiveIterator
public hasChildren() : bool
public key() : int
public next() : void
public render() : void
 

Recursively renders the tree to the output, applying the tree style.

public rewind() : void
public valid() : bool
Properties
private Iterator $children
 
  • var \Iterator<int,\TreeNode>
private readonly Symfony\Component\Console\Helper\TreeNode $node
private readonly Symfony\Component\Console\Output\OutputInterface $output
private readonly Symfony\Component\Console\Helper\TreeStyle $style
Methods
private __construct(Symfony\Component\Console\Output\OutputInterface $output, Symfony\Component\Console\Helper\TreeNode $node, Symfony\Component\Console\Helper\TreeStyle $style)
Methods
public static createTree(Symfony\Component\Console\Output\OutputInterface $output, Symfony\Component\Console\Helper\TreeNode|string|?null $root = NULL, iterable $values = [], ?Symfony\Component\Console\Helper\TreeStyle $style = NULL) : self
© 2025 Bruce Wells