52 lines
1.4 KiB
PHP
52 lines
1.4 KiB
PHP
<?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,
|
|
];
|
|
}
|
|
}
|