init
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Esun\LingxingErp\Block\Adminhtml\Store;
|
||||
|
||||
use Magento\Backend\Block\Widget\Button;
|
||||
|
||||
class SyncButton extends Button
|
||||
{
|
||||
protected function _construct(): void
|
||||
{
|
||||
parent::_construct();
|
||||
$url = $this->getUrl('esun_lingxing/store/sync');
|
||||
$message = (string)__('Fetch all stores from Lingxing now?');
|
||||
$this->setData([
|
||||
'label' => __('Sync Stores'),
|
||||
'class' => 'primary',
|
||||
'onclick' => sprintf(
|
||||
'confirmSetLocation(%s, %s)',
|
||||
json_encode($message, JSON_HEX_APOS | JSON_HEX_QUOT),
|
||||
json_encode($url, JSON_HEX_APOS | JSON_HEX_QUOT)
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user