/** * {@inheritdoc} */ public function setContext(BuilderContext $context) { $this->input = $context->getInput(); $this->output = $context->getOutput(); $this->application = $context->getApplication(); $style = new OutputFormatterStyle('blue', 'black', ['bold']); $this->output->getFormatter()->setStyle('section', $style); }
private function traverse(NodeInterface $node) { $i = 10; foreach ($node->getNodes() as $childNode) { $childNode->setProperty(NodeOrderSubscriber::SULU_ORDER, $i); $this->context->getOutput()->writeln(sprintf('<info>[+]</info> Setting order "<comment>%s</comment>" on <comment>%s</comment>', $i, $childNode->getPath())); $this->traverse($childNode); $i += 10; } }
/** * {@inheritdoc} */ public function setContext(BuilderContext $context) { $this->output = $context->getOutput(); }