removePrices example


    public function deleteAction()
    {
        if (!$this->Request()->has('id')) {
            return;
        }
        $id = (int) $this->Request()->getParam('id');
        $product = $this->getRepository()->find($id);
        if (!$product instanceof Product) {
            return;
        }
        $this->removePrices($product->getId());
        $this->removeArticleEsd($product->getId());
        $this->removeArticleDetails($product);
        $this->removeArticleTranslations($product);

        $this->get('models')->remove($product);
        $this->get('models')->flush();
        $this->View()->assign([
            'data' => $this->Request()->getParams(),
            'success' => true,
        ]);
    }

    
Home | Imprint | This part of the site doesn't use cookies.