src/Sulu/Bundle/DocumentManagerBundle/DataFixtures/DocumentExecutor.php
public function execute(array $fixtures, $purge = true, $initialize = true, OutputInterface $output = null)
    {
        $output = $output ?: new NullOutput();

        if (true === $initialize) {
            $output->writeln('<comment>Initializing repository</comment>');
            $this->initializer->initialize($output, $purge);
        }

        $output->writeln('<comment>Loading fixtures</comment>');
        foreach ($fixtures as $fixture) {
            $output->writeln(sprintf(
                ' - %s<info>loading "</info>%s<info>"</info>',
                $fixture instanceof OrderedFixtureInterface ? '[' . $fixture->getOrder() . ']' : '',
                get_class($fixture)
            ));

            $fixture->load($this->documentManager);
            $this->documentManager->clear();
        }
    }
public function execute(array $fixtures, $purge = true, $initialize = true, OutputInterface $output = null)
    {
        $output = $output ?: new NullOutput();

        if (true === $initialize) {
            $output->writeln('<comment>Initializing repository</comment>');
            $this->initializer->initialize($output, $purge);
        }

        $output->writeln('<comment>Loading fixtures</comment>');
        foreach ($fixtures as $fixture) {
            $output->writeln(sprintf(
                ' - %s<info>loading "</info>%s<info>"</info>',
                $fixture instanceof OrderedFixtureInterface ? '[' . $fixture->getOrder() . ']' : '',
                get_class($fixture)
            ));

            $fixture->load($this->documentManager);
            $this->documentManager->clear();
        }
    }
public function execute ( array $ fixtures , $ purge = true , $ initialize = true , OutputInterface $ output = null ) { $ output = $ output ? : new NullOutput ( ) ; if ( true === $ initialize ) { $ output -> writeln ( '<comment>Initializing repository</comment>' ) ; $ this -> initializer -> initialize ( $ output , $ purge ) ; } $ output -> writeln ( '<comment>Loading fixtures</comment>' ) ; foreach ( $ fixtures as $ fixture ) { $ output -> writeln ( sprintf ( ' - %s<info>loading "</info>%s<info>"</info>' , $ fixture instanceof OrderedFixtureInterface ? '[' . $ fixture -> getOrder ( ) . ']' : '' , get_class ( $ fixture ) ) ) ; $ fixture -> load ( $ this -> documentManager ) ; $ this -> documentManager -> clear ( ) ; } }
Load the given fixture classes.

@param array $fixtures
@param mixed $purge
@param mixed $initialize
@param OutputInterface $output
Load the given fixture classes .