Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
BulkConfigurationUnassign.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
11 
16 {
20  private $resourceConnection;
21 
25  public function __construct(
26  ResourceConnection $resourceConnection
27  ) {
28  $this->resourceConnection = $resourceConnection;
29  }
30 
37  public function execute(
38  array $skus,
39  array $sources
40  ) {
41  $tableName = $this->resourceConnection->getTableName('inventory_low_stock_notification_configuration');
42  $connection = $this->resourceConnection->getConnection();
43 
44  $connection->delete(
45  $tableName,
46  $connection->quoteInto('sku IN (?)', $skus) . ' AND ' .
47  $connection->quoteInto('source_code IN (?)', $sources)
48  );
49  }
50 }
$tableName
Definition: trigger.php:13
foreach($websiteCodes as $websiteCode) $skus
$connection
Definition: bulk.php:13