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,
]);
} /**
* Event listener function of the configurator group model of the product backend module.
* Fired when the user want to remove a configurator group.
* The function requires a passed id to load the shopware model an remove it over the model manager.
*/