public function renderNavigationList(\Twig_Environment $env, Node $themeRoot, array $nodes, $level, $maxLevels, $expandedLevels, Node $parentNode = null) { if ($nodes && $level < $maxLevels && ($level < $expandedLevels || $parentNode->isActivePath())) { return $this->renderBlock($env, $themeRoot, 'navigation_list', get_defined_vars()); } return ''; }
private function dumpNode(Node $n, OutputInterface $output, $depth = 0) { $first = true; $children = $n->getChildren(); foreach ($n->getData() as $property => $value) { if ($first) { $output->writeln(str_repeat(' | ', $depth) . ' |'); $sep = str_repeat(' | ', $depth) . ' +-- '; } else { $sep = str_repeat(' | ', $depth + 1) . ' '; } $output->writeln("{$sep}{$property} = {$this->formatValue($value)}"); $first = false; } foreach ($children as $child) { $this->dumpNode($child, $output, $depth + 1); } }