예제 #1
0
파일: SuluBuilder.php 프로젝트: sulu/sulu
 /**
  * {@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);
 }
예제 #2
0
 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;
     }
 }
예제 #3
0
 /**
  * {@inheritdoc}
  */
 public function setContext(BuilderContext $context)
 {
     $this->output = $context->getOutput();
 }