b374k
m1n1 1.01
Apache/2.4.41 (Ubuntu)
Linux vmi616275.contaboserver.net 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64
uid=33(www-data) gid=33(www-data) groups=33(www-data)
server ip : 62.171.164.128 | your ip : 127.0.0.1
safemode OFF
 >  / home / dev2.destoffenstraat.com / app / Firebear / ImportExport / Console / Command /
Filename/home/dev2.destoffenstraat.com/app/Firebear/ImportExport/Console/Command/ImportJobRunCommand.php
Size1.95 kb
Permissionrwxr-xr-x
Ownerroot : root
Create time17-Aug-2025 10:26
Last modified07-Nov-2022 06:44
Last accessed22-Aug-2025 03:27
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
<?php
/**
* @copyright: Copyright © 2021 Firebear Studio. All rights reserved.
* @author: Firebear Studio <fbeardev@gmail.com>
*/
namespace Firebear\ImportExport\Console\Command;

use Firebear\ImportExport\Logger\Logger;
use Firebear\ImportExport\Api\Import\RunByIdsInterface;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Magento\Framework\Console\Cli;
use Magento\Framework\App\State;

/**
* Import Run Command
*/
class ImportJobRunCommand extends ImportJobAbstractCommand
{
/**
* @var RunByIdsInterface
*/
private $runByIds;

/**
* Constructor
*
* @param Logger $logger
* @param State $state
* @param RunByIdsInterface $runById
*/
public function __construct(
Logger $logger,
State $state,
RunByIdsInterface $runByIds
) {
$this->runByIds = $runByIds;

parent::__construct(
$logger,
$state
);
}

/**
* {@inheritdoc}
*/
protected function configure()
{
$this->setName('import:job:run')
->setDescription('Generate Firebear Import Jobs')
->setDefinition(
[
new InputArgument(
self::JOB_ARGUMENT_NAME,
InputArgument::OPTIONAL | InputArgument::IS_ARRAY,
'Space-separated list of import job ids or omit to generate all jobs.'
)
]
);

parent::configure();
}

/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
if ($this->runByIds->execute($this->getJobIds($input), 'console')) {
return Cli::RETURN_SUCCESS;
}
$this->addLogComment('No jobs found', $output, 'error');

return Cli::RETURN_FAILURE;
}
}