addBundle() public method

Add or update a repo
public addBundle ( string $fullName, boolean $updateRepo = true ) : boolean | Bundle
$fullName string A full repo name like KnpLabs/KnpMenuBundle
$updateRepo boolean Whether or not to fetch information
return boolean | Knp\Bundle\KnpBundlesBundle\Entity\Bundle
 /**
  * {@inheritdoc}
  *
  * @throws \InvalidArgumentException When the target directory does not exist
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $gitRepoDir = $this->getContainer()->getParameter('knp_bundles.bundles_dir');
     $gitBin = $this->getContainer()->getParameter('knp_bundles.git_bin');
     $em = $this->getContainer()->get('knp_bundles.entity_manager');
     $updater = new Updater($em, $gitRepoDir, $gitBin, $output);
     $updater->setUp();
     $bundles = $updater->addBundle($input->getArgument('bundleName'));
     $em->flush();
 }