Your IP : 216.73.216.220


Current Path : /var/www/html/app/code/FlipsDigital/HktGateway/Setup/
Upload File :
Current File : /var/www/html/app/code/FlipsDigital/HktGateway/Setup/InstallData.php

<?php
/**
 * InstallData
 *
 * @copyright Copyright © 2021 Test. All rights reserved.
 * @author    test@test.com
 */

namespace FlipsDigital\HktGateway\Setup;

use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

/**
 * @codeCoverageIgnore
 */
class InstallData implements InstallDataInterface
{
    /**
     * PaymentLog setup factory
     *
     * @var PaymentLogSetupFactory
     */
    protected $paymentlogSetupFactory;

    /**
     * Init
     *
     * @param PaymentLogSetupFactory $paymentlogSetupFactory
     */
    public function __construct(PaymentLogSetupFactory $paymentlogSetupFactory)
    {
        $this->paymentlogSetupFactory = $paymentlogSetupFactory;
    }

    /**
     * {@inheritdoc}
     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
     */
    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) //@codingStandardsIgnoreLine
    {
        /** @var PaymentLogSetup $paymentlogSetup */
        $paymentlogSetup = $this->paymentlogSetupFactory->create(['setup' => $setup]);

        $setup->startSetup();

        $paymentlogSetup->installEntities();
        $entities = $paymentlogSetup->getDefaultEntities();
        foreach ($entities as $entityName => $entity) {
            $paymentlogSetup->addEntityType($entityName, $entity);
        }

        $setup->endSetup();
    }
}