Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
DeleteWebsiteToStockLinkPlugin.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
16 
21 {
25  private $deleteSalesChannel;
26 
30  public function __construct(
31  DeleteSalesChannelToStockLinkInterface $deleteSalesChannel
32  ) {
33  $this->deleteSalesChannel = $deleteSalesChannel;
34  }
35 
43  public function afterDelete(
44  WebsiteResourceModel $subject,
47  ) {
48  $websiteCode = $website->getCode();
49 
51  $this->deleteSalesChannel->execute(SalesChannelInterface::TYPE_WEBSITE, $websiteCode);
52  }
53  return $result;
54  }
55 }
afterDelete(WebsiteResourceModel $subject, WebsiteResourceModel $result, AbstractModel $website)
if(!isset($_GET['website_code'])) $websiteCode
Definition: website.php:11