createBundle() public method

public createBundle ( string $fullName, boolean $flushEntities = true ) : boolean | Bundle
$fullName string
$flushEntities boolean
return boolean | Knp\Bundle\KnpBundlesBundle\Entity\Bundle return false if the bundle is not valid
Beispiel #1
0
 /**
  * Add or update a repo
  *
  * @param string  $fullName    A full repo name like KnpLabs/KnpMenuBundle
  * @param boolean $updateRepo  Whether or not to fetch information
  *
  * @return boolean|Bundle
  */
 public function addBundle($fullName, $updateRepo = true)
 {
     $bundle = $this->bundleManager->createBundle($fullName);
     if (!$bundle) {
         return false;
     }
     if ($updateRepo) {
         $this->updateRepo($bundle);
     }
     return $bundle;
 }