Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
DeleteSalesChannelToStockLink.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
13 
21 {
25  private $resourceConnection;
26 
30  public function __construct(
31  ResourceConnection $resourceConnection
32  ) {
33  $this->resourceConnection = $resourceConnection;
34  }
35 
39  public function execute(string $type, string $code): void
40  {
41  $connection = $this->resourceConnection->getConnection();
42  $tableName = $this->resourceConnection->getTableName('inventory_stock_sales_channel');
43 
44  $connection->delete($tableName, [
47  ]);
48  }
49 }
$tableName
Definition: trigger.php:13
$type
Definition: item.phtml:13
$connection
Definition: bulk.php:13
$code
Definition: info.phtml:12