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 $sampleRepository;
20 
25  {
26  $this->sampleRepository = $sampleRepository;
27  }
28 
35  public function execute($entity, $arguments = [])
36  {
39  return $entity;
40  }
42  foreach ($this->sampleRepository->getList($entity->getSku()) as $sample) {
43  $this->sampleRepository->delete($sample->getId());
44  }
45  return $entity;
46  }
47 }
__construct(SampleRepository $sampleRepository)
$entity
Definition: element.phtml:22
$arguments