WellCommerce\Bundle\DistributionBundle\Manager\PackageManager::syncPackages PHP Method

syncPackages() public method

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