->checkRequirements()
->setupDatabase()
->setupAdmin()
+ ->setupConfig()
->setupAsset()
;
protected function checkRequirements()
{
- $this->defaultOutput->writeln('<info><comment>Step 1 of 4.</comment> Checking system requirements.</info>');
+ $this->defaultOutput->writeln('<info><comment>Step 1 of 5.</comment> Checking system requirements.</info>');
$fulfilled = true;
protected function setupDatabase()
{
- $this->defaultOutput->writeln('<info><comment>Step 2 of 4.</comment> Setting up database.</info>');
+ $this->defaultOutput->writeln('<info><comment>Step 2 of 5.</comment> Setting up database.</info>');
// user want to reset everything? Don't care about what is already here
if (true === $this->defaultInput->getOption('reset')) {
protected function setupAdmin()
{
- $this->defaultOutput->writeln('<info><comment>Step 3 of 4.</comment> Administration setup.</info>');
+ $this->defaultOutput->writeln('<info><comment>Step 3 of 5.</comment> Administration setup.</info>');
$questionHelper = $this->getHelperSet()->get('question');
$question = new ConfirmationQuestion('Would you like to create a new admin user (recommended) ? (Y/n)', true);
$em->persist($config);
+ $this->defaultOutput->writeln('');
+
+ return $this;
+ }
+
+ protected function setupConfig()
+ {
+ $this->defaultOutput->writeln('<info><comment>Step 4 of 5.</comment> Config setup.</info>');
+ $em = $this->getContainer()->get('doctrine.orm.entity_manager');
+
// cleanup before insert new stuff
$em->createQuery('DELETE FROM CraueConfigBundle:Setting')->execute();
protected function setupAsset()
{
- $this->defaultOutput->writeln('<info><comment>Step 4 of 4.</comment> Installing assets.</info>');
+ $this->defaultOutput->writeln('<info><comment>Step 5 of 5.</comment> Installing assets.</info>');
$this
->runCommand('assets:install')