patch_template.php.dist 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace %moduleName%\Setup\Patch\%patchType%;
  7. use Magento\Framework\Setup\Patch\DataPatchInterface;
  8. use Magento\Framework\Setup\Patch\SchemaPatchInterface;
  9. use Magento\Framework\Setup\Patch\PatchRevertableInterface;
  10. use Magento\Framework\Setup\ModuleDataSetupInterface;
  11. /**
  12. * Patch is mechanism, that allows to do atomic upgrade data changes
  13. */
  14. class %class% implements
  15. %patchInterface%
  16. {
  17. /**
  18. * @var ModuleDataSetupInterface $moduleDataSetup
  19. */
  20. private $moduleDataSetup;
  21. /**
  22. * @param ModuleDataSetupInterface $moduleDataSetup
  23. */
  24. public function __construct(ModuleDataSetupInterface $moduleDataSetup)
  25. {
  26. $this->moduleDataSetup = $moduleDataSetup;
  27. }
  28. /**
  29. * Do Upgrade
  30. *
  31. * @return void
  32. */
  33. public function apply()
  34. {
  35. }
  36. /**
  37. * {@inheritdoc}
  38. */
  39. public function getAliases()
  40. {
  41. return [];
  42. }
  43. /**
  44. * {@inheritdoc}
  45. */
  46. public static function getDependencies()
  47. {
  48. return [
  49. ];
  50. }
  51. }