Files
stemcell/app/code/Stemcell/Customer/Block/Adminhtml/Edit/SampleButton.php
T
2026-09-15 10:26:34 +08:00

26 lines
669 B
PHP

<?php
namespace Stemcell\Customer\Block\Adminhtml\Edit;
use Magento\Customer\Block\Adminhtml\Edit\GenericButton;
use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
class SampleButton extends GenericButton implements ButtonProviderInterface
{
public function getButtonData()
{
return [
'label' => __('下载模版文件'),
'class' => 'save primary',
'on_click' => sprintf("location.href = '%s';", $this->getSampleUrl()),
'sort_order' => 90,
];
}
protected function getSampleUrl()
{
return $this->getUrl('stemcell_customer/lab/sample');
}
}