public function delete($id)
    {
        // TODO: move shipping to an archive instead of remove it from database
        $shipping = $this->getShippingRepository()->findById($id);

        if (!$shipping) {
            throw new ShippingNotFoundException($id);
        }

        $this->em->remove($shipping);
        $this->em->flush();
    }
public function delete($id)
    {
        // TODO: move shipping to an archive instead of remove it from database
        $shipping = $this->getShippingRepository()->findById($id);

        if (!$shipping) {
            throw new ShippingNotFoundException($id);
        }

        $this->em->remove($shipping);
        $this->em->flush();
    }
public function delete ( $ id ) { // TODO: move shipping to an archive instead of remove it from database $ shipping = $ this -> getShippingRepository ( ) -> findById ( $ id ) ; if ( ! $ shipping ) { throw new ShippingNotFoundException ( $ id ) ; } $ this -> em -> remove ( $ shipping ) ; $ this -> em -> flush ( ) ; }
Delete a shipping

@param $id
@throws Exception\ShippingNotFoundException
Delete a shipping