Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
DeleteHandler.php
Go to the documentation of this file.
1 <?php
7 
10 
15 {
19  protected $linkRepository;
20 
25  {
26  $this->linkRepository = $linkRepository;
27  }
28 
35  public function execute($entity, $arguments = [])
36  {
38  return $entity;
39  }
41  foreach ($this->linkRepository->getList($entity->getSku()) as $link) {
42  $this->linkRepository->delete($link->getId());
43  }
44  return $entity;
45  }
46 }
$entity
Definition: element.phtml:22
$arguments