Esempio n. 1
0
 /**
  * Update Save and Delete buttons. Remove Delete button if group can't be deleted.
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_objectId = 'id';
     $this->_controller = 'adminhtml_group';
     $this->_blockGroup = 'Magento_Customer';
     $this->buttonList->update('save', 'label', __('Save Customer Group'));
     $this->buttonList->update('delete', 'label', __('Delete Customer Group'));
     $groupId = $this->_coreRegistry->registry(RegistryConstants::CURRENT_GROUP_ID);
     if (!$groupId || !$this->_groupService->canDelete($groupId)) {
         $this->buttonList->remove('delete');
     }
 }