customerAccountManagement = $customerAccountManagement; } /** * @return array */ public function getButtonData() { $customerId = $this->getCustomerId(); $canModify = !$customerId || !$this->customerAccountManagement->isReadonly($this->getCustomerId()); $data = []; if ($canModify) { $data = [ 'label' => __('Save Customer'), 'class' => 'save primary', 'data_attribute' => [ 'mage-init' => ['button' => ['event' => 'save']], 'form-role' => 'save', ], 'sort_order' => 90, ]; } return $data; } }