websolute / magento-m2if-wrapper
这是一个用于程序化调用 m2if 命令的包装器
1.0.0
2021-03-29 14:29 UTC
Requires
- magento/framework: *
- techdivision/import-adapter-custom: dev-master as 1.0.0
- techdivision/import-cli-simple: ^3.8
README
安装
安装 composer 补丁系统
composer require cweagans/composer-patches:^1.6
然后在您的 compose.json 文件中添加以下额外数据
"extra": {
"patches": {
"websolute/m2if-wrapper": {
"m2ifWrapper.patch ": "m2ifSetTokens.patch"
}
}
}
如何使用
只需注入以下管理器
\Websolute\M2ifWrapper\Model\Wrapper $wrapper
然后使用 execute(array $parameters, OutputInterface $output)
方法来程序化运行 m2if
// \Symfony\Component\Console\Output\Output $outputLogger
$parameters = [
'--source-dir=var/importexport',
'--parameterX'
];
$exitCode = $this->wrapper->execute($parameters, $outputLogger);