|
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 / Block / Adminhtml / Job / Edit / |
Filename | /home/dev2.destoffenstraat.com/app/code/Amasty/ExportPro/Block/Adminhtml/Job/Edit/SaveAndRun.php |
Size | 1.36 kb |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 17-Aug-2025 10:26 |
Last modified | 14-Jun-2025 23:44 |
Last accessed | 24-Aug-2025 02:07 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
<?php
/**
* @author Amasty Team
* @copyright Copyright (c) Amasty (https://www.amasty.com)
* @package Export Pro for Magento 2 (System)
*/
namespace Amasty\ExportPro\Block\Adminhtml\Job\Edit;
use Amasty\ExportPro\Model\Job\Job;
use Magento\Framework\App\RequestInterface;
use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
class SaveAndRun implements ButtonProviderInterface
{
/**
* @var RequestInterface
*/
private $request;
public function __construct(
RequestInterface $request
) {
$this->request = $request;
}
/**
* @return array
*/
public function getButtonData()
{
$jobId = (int)$this->request->getParam(Job::JOB_ID);
if (!$jobId) {
return [];
}
return [
'label' => __('Save and Generate'),
'class' => 'save',
'data_attribute' => [
'mage-init' => [
'Magento_Ui/js/form/button-adapter' => [
'actions' => [
[
'targetName' => 'export_job_form.export_job_form',
'actionName' => 'saveAndRun'
]
]
]
],
],
'on_click' => ''
];
}
}
/**
* @author Amasty Team
* @copyright Copyright (c) Amasty (https://www.amasty.com)
* @package Export Pro for Magento 2 (System)
*/
namespace Amasty\ExportPro\Block\Adminhtml\Job\Edit;
use Amasty\ExportPro\Model\Job\Job;
use Magento\Framework\App\RequestInterface;
use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
class SaveAndRun implements ButtonProviderInterface
{
/**
* @var RequestInterface
*/
private $request;
public function __construct(
RequestInterface $request
) {
$this->request = $request;
}
/**
* @return array
*/
public function getButtonData()
{
$jobId = (int)$this->request->getParam(Job::JOB_ID);
if (!$jobId) {
return [];
}
return [
'label' => __('Save and Generate'),
'class' => 'save',
'data_attribute' => [
'mage-init' => [
'Magento_Ui/js/form/button-adapter' => [
'actions' => [
[
'targetName' => 'export_job_form.export_job_form',
'actionName' => 'saveAndRun'
]
]
]
],
],
'on_click' => ''
];
}
}