magento2-docker/app/code/IpSupply/SyncOrder/Setup/UpgradeData.php

34 lines
1.2 KiB
PHP
Executable File

<?php
namespace IpSupply\SyncOrder\Setup;
use Magento\Catalog\Model\Product;
use Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\UpgradeDataInterface;
class UpgradeData implements UpgradeDataInterface
{
protected $_eavSetupFactory;
protected $_attributeRepositoryInterface;
protected $_attributeSetupFactory;
public function __construct(
\Magento\Eav\Setup\EavSetupFactory $eavSetupFactory,
\Magento\Eav\Api\AttributeRepositoryInterface $attributeRepositoryInterface,
\Magento\Catalog\Setup\CategorySetupFactory $attributeSetupFactory
) {
$this->_eavSetupFactory = $eavSetupFactory;
$this->_attributeRepositoryInterface = $attributeRepositoryInterface;
$this->_attributeSetupFactory = $attributeSetupFactory;
}
public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
\IpSupply\SyncOrder\Config\Setter::set(path: 'config', value: json_encode([
'url' => 'https://google.com' // TODO: config api
]));
}
}