src/Sulu/Bundle/DocumentManagerBundle/Initializer/Initializer.php
public function initialize(OutputInterface $output = null, $purge = false)
    {
        $output = $output ?: new NullOutput();

        arsort($this->initializerMap);

        foreach (array_keys($this->initializerMap) as $initializerId) {
            $output->writeln(sprintf('<comment>%s</>', $initializerId));
            $initializer = $this->container->get($initializerId);
            $initializer->initialize($output, $purge);
        }
        $output->write(PHP_EOL);
        $output->writeln('<comment>*</> Legend: [+] Added [*] Updated [-] Purged [ ] No change');
    }
public function initialize(OutputInterface $output = null, $purge = false)
    {
        $output = $output ?: new NullOutput();

        arsort($this->initializerMap);

        foreach (array_keys($this->initializerMap) as $initializerId) {
            $output->writeln(sprintf('<comment>%s</>', $initializerId));
            $initializer = $this->container->get($initializerId);
            $initializer->initialize($output, $purge);
        }
        $output->write(PHP_EOL);
        $output->writeln('<comment>*</> Legend: [+] Added [*] Updated [-] Purged [ ] No change');
    }
public function initialize ( OutputInterface $ output = null , $ purge = false ) { $ output = $ output ? : new NullOutput ( ) ; arsort ( $ this -> initializerMap ) ; foreach ( array_keys ( $ this -> initializerMap ) as $ initializerId ) { $ output -> writeln ( sprintf ( '<comment>%s</>' , $ initializerId ) ) ; $ initializer = $ this -> container -> get ( $ initializerId ) ; $ initializer -> initialize ( $ output , $ purge ) ; } $ output -> write ( PHP_EOL ) ; $ output -> writeln ( '<comment>*</> Legend: [+] Added [*] Updated [-] Purged [ ] No change' ) ; }
Initialize the content repository, optionally purging it before-hand.

@param OutputInterface $output
@param bool $purge
Initialize the content repository optionally purging it before - hand .