init
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user