terms tree
This commit is contained in:
parent
8d15410168
commit
b8474e717e
|
@ -46,13 +46,15 @@ class CategoriesTreeCommand extends Command
|
|||
|
||||
foreach ($response->getData() as $category) {
|
||||
if (isset($category['name'])) {
|
||||
$output->writeln(sprintf('%s', $category['name']));
|
||||
$output->writeln(sprintf('`- %s', $category['name']));
|
||||
}
|
||||
|
||||
if (!empty($category['cats'])) {
|
||||
$isFirst = true;
|
||||
|
||||
foreach ($category['cats'] as $subCategory) {
|
||||
if (isset($subCategory['name'])) {
|
||||
$output->writeln(sprintf('> %s', $subCategory['name']));
|
||||
$output->writeln(sprintf(' |- %s', $subCategory['name']));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue