public function syncPackages($type)
    {
        $criteria      = ['type' => $type];
        $em            = $this->getDoctrineHelper()->getEntityManager();
        $searchResults = $this->getHelper()->getPackages($criteria);

        foreach ($searchResults as $result) {
            $package = $this->getHelper()->getPackage($result);
            $this->syncPackage($package);
        }
        
        $em->flush();
    }
public function syncPackages($type)
    {
        $criteria      = ['type' => $type];
        $em            = $this->getDoctrineHelper()->getEntityManager();
        $searchResults = $this->getHelper()->getPackages($criteria);

        foreach ($searchResults as $result) {
            $package = $this->getHelper()->getPackage($result);
            $this->syncPackage($package);
        }
        
        $em->flush();
    }
public function syncPackages ( $ type ) { $ criteria = [ 'type' => $ type ] ; $ em = $ this -> getDoctrineHelper ( ) -> getEntityManager ( ) ; $ searchResults = $ this -> getHelper ( ) -> getPackages ( $ criteria ) ; foreach ( $ searchResults as $ result ) { $ package = $ this -> getHelper ( ) -> getPackage ( $ result ) ; $ this -> syncPackage ( $ package ) ; } $ em -> flush ( ) ; }
Searches for all packages of particular type and adds them to Smuggler
Searches for all packages of particular type and adds them to Smuggler