Skip to content
Snippets Groups Projects
CustomImportExecutor.php 1.27 KiB
Newer Older
Vadim Justus's avatar
Vadim Justus committed
<?php
/**
 * Copyright (c) 2020 TechDivision GmbH
 * All rights reserved
 *
 * This product includes proprietary software developed at TechDivision GmbH, Germany
 * For more information see http://www.techdivision.com/
 *
 * To obtain a valid license for using this software please contact us at
 * license@techdivision.com
 */

declare(strict_types=1);

namespace TechDivision\OverwriteImportStep\Model\Executor;

use Magento\Framework\Exception\FileSystemException;
use TechDivision\PacemakerImportBase\Model\Executor\ImportExecutor;
use TechDivision\ProcessPipelines\Api\StepInterface;
use TechDivision\ProcessPipelines\Exception\ExecutorException;

/**
 * @copyright  Copyright (c) 2020 TechDivision GmbH (http://www.techdivision.com)
 * @link       http://www.techdivision.com/
 * @author     Vadim Justus <v.justus@techdivision.com>
 */
class CustomImportExecutor extends ImportExecutor
{
    /**
     * @param StepInterface $step
     * @throws FileSystemException
     * @throws ExecutorException
     */
    public function process(StepInterface $step): void
    {
        $arguments = $step->getArguments();
        $arguments['configuration'] = 'TechDivision_OverwriteImportStep::etc/import/config.json';
        $step->setArguments($arguments);

        parent::process($step);
    }
}