InitializeWebsiteDefaultSock.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\InventorySales\Setup\Patch\Schema;
  8. use Magento\Framework\Setup\Patch\SchemaPatchInterface;
  9. use Magento\InventorySales\Setup\Operation\AssignWebsiteToDefaultStock;
  10. use Magento\Store\Setup\Patch\Schema\InitializeStoresAndWebsites;
  11. class InitializeWebsiteDefaultSock implements SchemaPatchInterface
  12. {
  13. /**
  14. * @var AssignWebsiteToDefaultStock
  15. */
  16. private $assignWebsiteToDefaultStock;
  17. public function __construct(AssignWebsiteToDefaultStock $assignWebsiteToDefaultStock)
  18. {
  19. $this->assignWebsiteToDefaultStock = $assignWebsiteToDefaultStock;
  20. }
  21. /**
  22. * @inheritDoc
  23. */
  24. public function apply()
  25. {
  26. $this->assignWebsiteToDefaultStock->execute();
  27. return $this;
  28. }
  29. /**
  30. * @inheritDoc
  31. */
  32. public static function getDependencies()
  33. {
  34. return [
  35. InitializeStoresAndWebsites::class
  36. ];
  37. }
  38. /**
  39. * @inheritDoc
  40. */
  41. public function getAliases()
  42. {
  43. return [];
  44. }
  45. }