Delete brand product relation

@param int $idProductAbstract
@param array $brandIds

@return void
511680
public function deleteBrandProductRelations(int $idProductAbstract, array $brandIds): void
    {
        if (count($brandIds) === 0) {
            return;
        }

        $this->getFactory()
            ->getBrandProductQuery()
            ->filterByFkProductAbstract($idProductAbstract)
            ->filterByFkBrand_In($brandIds)
            ->delete();
    }
192337
public function removeCompanyRelations(int $idProductList, array $companyIds): void
    {
        if (count($companyIds) === 0) {
            return;
        }

        $productListCompanyEntities = $this->getFactory()
            ->createProductListCompanyQuery()
            ->filterByFkProductList($idProductList)
            ->filterByFkCompany_In($companyIds)
            ->find();

        foreach ($productListCompanyEntities as $productListCompany) {
            $productListCompany->delete();
        }
    }
1349752
public function deleteFeatureProductValue(FeatureProductDeleteEvent $event)
    {
        FeatureProductQuery::create()
            ->filterByProductId($event->getProductId())
            ->filterByFeatureId($event->getFeatureId())
            ->delete()
        ;
    }
734573
public function delete($productId, $skuId, $userId, $optParams = array()) {
      $params = array('productId' => $productId, 'skuId' => $skuId, 'userId' => $userId);
      $params = array_merge($params, $optParams);
      $data = $this->__call('delete', array($params));
      return $data;
    }
466082
public function createProductAbstractBrands(ProductAbstractTransfer $productAbstractTransfer): ProductAbstractTransfer
    {
        if ($productAbstractTransfer->getBrandCollection() !== null) {
            $requestedBrandIds = $this->getBrandIds($productAbstractTransfer->getBrandCollection());

            if (count($requestedBrandIds) > 0) {
                $this->brandProductEntityManager->addBrandProductRelations($productAbstractTransfer->getIdProductAbstract(), $requestedBrandIds);
            }

            $productAbstractTransfer->setBrandCollection($this->brandProductReader->getBrandCollectionByIdProductAbstractId($productAbstractTransfer));
        }

        return $productAbstractTransfer;
    }
257419
protected function checkBrandIDField()
    {
        //Check "brand_id" field
        if ($this->obElement->getOriginal('brand_id') == $this->obElement->brand_id) {
            return;
        }

        //Update product ID cache list for brand
        ProductListStore::instance()->brand->clear($this->obElement->brand_id);
        ProductListStore::instance()->brand->clear((int) $this->obElement->getOriginal('brand_id'));
    }
1274366
@Override
  public MultipleObjectsBundle delete(DBIDs ids) {
    // Prepare bundle to return
    MultipleObjectsBundle bundle = new MultipleObjectsBundle();
    for(Relation<?> relation : relations) {
      ArrayList<Object> data = new ArrayList<>(ids.size());
      for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
        data.add(relation.get(iter));
      }
      bundle.appendColumn(relation.getDataTypeInformation(), data);
    }
    // remove from db
    for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
      doDelete(iter);
    }
    // fire deletion event
    eventManager.fireObjectsRemoved(ids);

    return bundle;
  }
678659
public function getBrandCollectionByIdProductAbstractId(ProductAbstractTransfer $productAbstractTransfer): BrandCollectionTransfer
    {
        $productAbstractTransfer->requireIdProductAbstract();

        return $this->brandProductRepository->getBrandCollectionByAbstractIdProduct($productAbstractTransfer->getIdProductAbstract());
    }
703977
public function delete($productId, $force = null)
    {
        $options = (object)[];
        $options->qs = [ "force" => ($force ? "true" : "false") ];

        return $this->client->delete("/products/" . rawurlencode($productId), null, $options);
    }
1129640
protected function deleteImagesProduct()
    {
        $this->controlAccess('product_edit');

        $file_ids = $this->getPosted('delete_images', array(), true, 'array');
        return $this->image->delete($file_ids);
    }
250578
public function canDelete($product_class_id)
    {
        $sql = 'SELECT product_id FROM product WHERE product_class_id=?';
        $result = $this->db->fetchColumn($sql, array($product_class_id));
        return empty($result);
    }
529299
private void doDelete(DBIDRef id) {
    // Remove id
    ids.remove(id);
    // Remove from all representations.
    for(Relation<?> relation : relations) {
      // ID has already been removed, and this would loop...
      if(relation == idrep) {
        continue;
      }
      if(!(relation instanceof ModifiableRelation)) {
        throw new AbortException("Non-modifiable relations have been added to the database.");
      }
      ((ModifiableRelation<?>) relation).delete(id);
    }
    DBIDFactory.FACTORY.deallocateSingleDBID(id);
  }
949294
protected static function deleteProductByIdAsyncWithHttpInfo($product_id) 
    {
        $returnType = '';  
        $request = self::deleteProductByIdRequest($product_id); 

        return self::getHttpClient()
            ->sendAsync($request, self::createHttpClientOption())
            ->then(
                function ($response) use ($returnType) {
                    return [null, $response->getStatusCode(), $response->getHeaders()];
                },
                function ($exception) {
                    $response = $exception->getResponse();
                    $statusCode = $response->getStatusCode();
                    throw new ApiException(
                        sprintf(
                            '[%d] Error connecting to the API (%s)',
                            $statusCode,
                            $exception->getRequest()->getUri()
                        ),
                        $statusCode,
                        $response->getHeaders(),
                        $response->getBody()
                    );
                }
            );
    }
671274
public function detach(array $ids, BelongsToMany $relation)
    {
        if (empty($ids)) {
            return;
        }

        $this->newPivotQuery($relation)
             ->whereIn($this->getRelatedPivotKeyName($relation), $ids)
             ->delete();
    }
1290017
public function deleteProduct($productId)
    {
        $result = $this->wechat->httpRaw(self::WECHAT_PRODUCT_DELETE_PREFIX, [
            'product_id' => $productId
        ], [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'success';
    }
1129298
protected function removeListItems( $productId )
	{
		$manager = \Aimeos\MShop::create( $this->getContext(), 'product/lists' );

		$search = $manager->createSearch();
		$expr = array(
			$search->compare( '==', 'product.lists.parentid', $productId ),
			$search->compare( '==', 'product.lists.domain', 'product' ),
			$search->compare( '==', 'product.lists.type', 'bought-together' ),
		);
		$search->setConditions( $search->combine( '&&', $expr ) );

		$listItems = $manager->searchItems( $search );

		$manager->deleteItems( array_keys( $listItems ) );
	}
944509
public function editProductClass($product_class_id = null)
    {
        $this->setProductClass($product_class_id);
        $this->setTitleEditProductClass();
        $this->setBreadcrumbEditProductClass();

        $this->setData('can_delete', $this->canDeleteProductClass());
        $this->setData('product_class', $this->data_product_class);

        $this->submitEditProductClass();
        $this->outputEditProductClass();
    }