Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
UpdateInventorySourceItem.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
13 
18 {
22  private $moduleDataSetup;
23 
27  private $operation;
28 
33  public function __construct(
34  ModuleDataSetupInterface $moduleDataSetup,
35  Operation $operation
36  ) {
37  $this->moduleDataSetup = $moduleDataSetup;
38  $this->operation = $operation;
39  }
40 
44  public function apply()
45  {
46  $this->operation->execute($this->moduleDataSetup);
47 
48  return $this;
49  }
50 
54  public static function getDependencies()
55  {
56  return [
57  InitializeDefaultStock::class,
58  ];
59  }
60 
64  public function getAliases()
65  {
66  return [];
67  }
68 }
__construct(ModuleDataSetupInterface $moduleDataSetup, Operation $operation)