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