24 lines
727 B
PHP
24 lines
727 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace Esun\LingxingErp\Block\Adminhtml\Warehouse;
|
|
|
|
use Magento\Backend\Block\Widget\Button;
|
|
|
|
class SyncButton extends Button
|
|
{
|
|
protected function _construct(): void
|
|
{
|
|
parent::_construct();
|
|
$this->setData([
|
|
'label' => __('Sync Warehouses'),
|
|
'class' => 'primary',
|
|
'onclick' => sprintf(
|
|
'confirmSetLocation(%s, %s)',
|
|
json_encode((string)__('Fetch and cache Lingxing type 3 warehouses now? Magento Sources will not be changed.'), JSON_HEX_APOS | JSON_HEX_QUOT),
|
|
json_encode($this->getUrl('esun_lingxing/warehouse/sync'), JSON_HEX_APOS | JSON_HEX_QUOT)
|
|
),
|
|
]);
|
|
}
|
|
}
|