terms tree

This commit is contained in:
Simon Vieille 2015-02-10 02:49:09 +01:00
parent 8d15410168
commit b8474e717e

View file

@ -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']));
}
}
}