setContainer($this->container); $input = new ArrayInput(array('userId' => $this->getUser()->getId())); $return = $command->run($input, new NullOutput()); if ($return == 0) { $this->get('session')->getFlashBag()->add( 'notice', 'Import successful' ); } else { $this->get('session')->getFlashBag()->add( 'warning', 'Import failed' ); } return $this->redirect('/'); } }