Skip to content

Commit 18e3be4

Browse files
Merge remote-tracking branch 'remotes/github/MAGETWO-91589' into EPAM-PR-34
2 parents 6fef69b + eb1827c commit 18e3be4

File tree

1 file changed

+10
-5
lines changed
  • app/code/Magento/CatalogUrlRewrite/Model/ResourceModel/Category

1 file changed

+10
-5
lines changed

app/code/Magento/CatalogUrlRewrite/Model/ResourceModel/Category/Product.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
99
use Magento\UrlRewrite\Model\Storage\DbStorage;
1010

11+
/**
12+
* Product Resource Class
13+
*/
1114
class Product extends AbstractDb
1215
{
1316
/**
@@ -38,6 +41,8 @@ protected function _construct()
3841
}
3942

4043
/**
44+
* Save multiple data
45+
*
4146
* @param array $insertData
4247
* @return int
4348
*/
@@ -70,18 +75,18 @@ public function removeMultiple(array $removeData)
7075
}
7176

7277
/**
73-
* Removes multiple entities from url_rewrite table using entities from catalog_url_rewrite_product_category
78+
* Removes multiple data by filter
79+
*
80+
* Removes multiple entities from url_rewrite table
81+
* using entities from catalog_url_rewrite_product_category
7482
* Example: $filter = ['category_id' => [1, 2, 3], 'product_id' => [1, 2, 3]]
7583
*
7684
* @param array $filter
7785
* @return int
7886
*/
7987
public function removeMultipleByProductCategory(array $filter)
8088
{
81-
return $this->getConnection()->delete(
82-
$this->getTable(self::TABLE_NAME),
83-
['url_rewrite_id in (?)' => $this->prepareSelect($filter)]
84-
);
89+
return $this->getConnection()->deleteFromSelect($this->prepareSelect($filter), self::TABLE_NAME);
8590
}
8691

8792
/**

0 commit comments

Comments
 (0)