This commit is contained in:
2026-09-15 10:26:34 +08:00
commit ecf36afa56
10493 changed files with 1404888 additions and 0 deletions
@@ -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');
}
}
@@ -0,0 +1,51 @@
<?php
namespace Stemcell\Customer\Block\Adminhtml\Edit;
use Magento\Customer\Api\AccountManagementInterface;
use Magento\Customer\Block\Adminhtml\Edit\GenericButton;
use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
/**
* Class SaveButton
* @package Magento\Customer\Block\Adminhtml\Edit
*/
class SaveButton extends GenericButton implements ButtonProviderInterface
{
/**
* @var AccountManagementInterface
*/
protected $customerAccountManagement;
/**
* Constructor
*
* @param \Magento\Backend\Block\Widget\Context $context
* @param \Magento\Framework\Registry $registry
* @param AccountManagementInterface $customerAccountManagement
*/
public function __construct(
\Magento\Backend\Block\Widget\Context $context,
\Magento\Framework\Registry $registry,
AccountManagementInterface $customerAccountManagement
) {
parent::__construct($context, $registry);
$this->customerAccountManagement = $customerAccountManagement;
}
/**
* @return array
*/
public function getButtonData()
{
return [
'label' => __('Save'),
'class' => 'save primary',
'data_attribute' => [
'mage-init' => ['button' => ['event' => 'save']],
'form-role' => 'save',
],
'sort_order' => 90,
];
}
}
@@ -0,0 +1,19 @@
<?php
namespace Stemcell\Customer\Block\Adminhtml\Edit\Tab;
class View extends \Magento\Customer\Block\Adminhtml\Edit\Tab\View
{
public function canShowTab()
{
return false;
}
/**
* @return bool
*/
public function isHidden()
{
return true;
}
}
@@ -0,0 +1,24 @@
<?php
namespace Stemcell\Customer\Block\Adminhtml\Salesperson;
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/salesperson/sample');
}
}