InstallData.php 935 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\TestSetupDeclarationModule3\Setup;
  7. use Magento\Framework\Setup\InstallDataInterface;
  8. use Magento\Framework\Setup\ModuleContextInterface;
  9. use Magento\Framework\Setup\ModuleDataSetupInterface;
  10. /**
  11. * Class InstallData
  12. * @package Magento\TestSetupDeclarationModule3\Setup
  13. */
  14. class InstallData implements InstallDataInterface
  15. {
  16. /**
  17. * {@inheritdoc}
  18. * @SuppressWarnings(PHPMD.CyclomaticComplexity)
  19. * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
  20. * @SuppressWarnings(PHPMD.NPathComplexity)
  21. */
  22. public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
  23. {
  24. $adapter = $setup->getConnection();
  25. $setup->startSetup();
  26. $adapter->insertArray('reference_table', ['some_integer'], [7, 2, 3, 5]);
  27. $setup->endSetup();
  28. }
  29. }