public function changePackageStatus(Request $request)
    {
        /**
         * @var $package \WellCommerce\Bundle\DistributionBundle\Entity\Package
         */
        $id         = $request->attributes->get('id');
        $em         = $this->getDoctrineHelper()->getEntityManager();
        $repository = $this->getRepository();
        $package    = $repository->find($id);
        
        if (null === $package) {
            throw new EntityNotFoundException($repository->getMetaData()->getName(), $id);
        }
        
        $this->setPackageVersions($package);
        
        $em->flush();
    }
public function changePackageStatus(Request $request)
    {
        /**
         * @var $package \WellCommerce\Bundle\DistributionBundle\Entity\Package
         */
        $id         = $request->attributes->get('id');
        $em         = $this->getDoctrineHelper()->getEntityManager();
        $repository = $this->getRepository();
        $package    = $repository->find($id);
        
        if (null === $package) {
            throw new EntityNotFoundException($repository->getMetaData()->getName(), $id);
        }
        
        $this->setPackageVersions($package);
        
        $em->flush();
    }
public function changePackageStatus ( Request $ request ) { /**
         * @var $package \WellCommerce\Bundle\DistributionBundle\Entity\Package
         */ $ id = $ request -> attributes -> get ( 'id' ) ; $ em = $ this -> getDoctrineHelper ( ) -> getEntityManager ( ) ; $ repository = $ this -> getRepository ( ) ; $ package = $ repository -> find ( $ id ) ; if ( null === $ package ) { throw new EntityNotFoundException ( $ repository -> getMetaData ( ) -> getName ( ) , $ id ) ; } $ this -> setPackageVersions ( $ package ) ; $ em -> flush ( ) ; }
Changes package info according to operation and data fetched from PackagistAPI

@param Request $request

@throws EntityNotFoundException
Changes package info according to operation and data fetched from PackagistAPI