/** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\Data\FormFactory $formFactory * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder * @param \Magento\Customer\Model\Metadata\FormFactory $customerFormFactory * @param \Magento\Store\Model\System\Store $systemStore * @param \Magento\Customer\Helper\Data $customerHelper * @param \Magento\Customer\Service\V1\CustomerAccountServiceInterface $customerAccountService * @param \Magento\Customer\Service\V1\CustomerMetadataServiceInterface $customerMetadataService * @param \Magento\Customer\Service\V1\Data\CustomerBuilder $customerBuilder * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Data\FormFactory $formFactory, \Magento\Framework\Json\EncoderInterface $jsonEncoder, \Magento\Customer\Model\Metadata\FormFactory $customerFormFactory, \Magento\Store\Model\System\Store $systemStore, \Magento\Customer\Helper\Data $customerHelper, \Magento\Customer\Service\V1\CustomerAccountServiceInterface $customerAccountService, \Magento\Customer\Service\V1\CustomerMetadataServiceInterface $customerMetadataService, \Magento\Customer\Service\V1\Data\CustomerBuilder $customerBuilder, array $data = array()) { $this->_customerHelper = $customerHelper; $this->_jsonEncoder = $jsonEncoder; $this->_systemStore = $systemStore; $this->_customerFormFactory = $customerFormFactory; $this->_customerAccountService = $customerAccountService; $this->_customerMetadataService = $customerMetadataService; $this->_customerBuilder = $customerBuilder; parent::__construct($context, $registry, $formFactory, $data); }
/** * @return $this */ protected function _prepareLayout() { $this->addChild('delete_button', 'Magento\\Backend\\Block\\Widget\\Button', array('label' => __('Delete Address'), 'name' => 'delete_address', 'element_name' => 'delete_address', 'disabled' => $this->isReadonly(), 'class' => 'delete' . ($this->isReadonly() ? ' disabled' : ''))); $this->addChild('add_address_button', 'Magento\\Backend\\Block\\Widget\\Button', array('label' => __('Add New Address'), 'id' => 'add_address_button', 'name' => 'add_address_button', 'element_name' => 'add_address_button', 'disabled' => $this->isReadonly(), 'class' => 'add' . ($this->isReadonly() ? ' disabled' : ''))); $this->addChild('cancel_button', 'Magento\\Backend\\Block\\Widget\\Button', array('label' => __('Cancel'), 'id' => 'cancel_add_address' . $this->getTemplatePrefix(), 'name' => 'cancel_address', 'element_name' => 'cancel_address', 'class' => 'cancel delete-address' . ($this->isReadonly() ? ' disabled' : ''), 'disabled' => $this->isReadonly())); return parent::_prepareLayout(); }
/** * @return $this */ protected function _prepareLayout() { $this->addChild('delete_button', 'Magento\\Backend\\Block\\Widget\\Button', ['label' => __('Delete Address'), 'name' => 'delete_address', 'element_name' => 'delete_address', 'disabled' => $this->isReadonly(), 'class' => 'delete' . ($this->isReadonly() ? ' disabled' : '')]); $this->addChild('add_address_button', 'Magento\\Backend\\Block\\Widget\\Button', ['label' => __('Add New Address'), 'id' => 'add_address_button', 'name' => 'add_address_button', 'element_name' => 'add_address_button', 'disabled' => $this->isReadonly(), 'class' => 'add' . ($this->isReadonly() ? ' disabled' : ''), 'data_attribute' => ['ui-id' => 'adminhtml-edit-tab-addresses-add-address-button']]); $this->addChild('cancel_button', 'Magento\\Backend\\Block\\Widget\\Button', ['label' => __('Cancel'), 'id' => 'cancel_add_address' . $this->getTemplatePrefix(), 'name' => 'cancel_address', 'element_name' => 'cancel_address', 'class' => 'cancel delete-address' . ($this->isReadonly() ? ' disabled' : ''), 'disabled' => $this->isReadonly()]); return parent::_prepareLayout(); }
/** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\Data\FormFactory $formFactory * @param \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor * @param \Magento\Customer\Model\Options $options * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder * @param \Magento\Store\Model\System\Store $systemStore * @param \Magento\Customer\Model\Metadata\FormFactory $customerFormFactory * @param \Magento\Customer\Api\AccountManagementInterface $accountManagement * @param \Magento\Customer\Api\CustomerMetadataInterface $customerMetadata * @param \Magento\Customer\Api\Data\CustomerInterfaceFactory $customerDataFactory * @param \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter * @param \Magento\Framework\Api\DataObjectHelper $dataObjectHelper * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Data\FormFactory $formFactory, \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor, \Magento\Customer\Model\Options $options, \Magento\Framework\Json\EncoderInterface $jsonEncoder, \Magento\Store\Model\System\Store $systemStore, \Magento\Customer\Model\Metadata\FormFactory $customerFormFactory, \Magento\Customer\Api\AccountManagementInterface $accountManagement, \Magento\Customer\Api\CustomerMetadataInterface $customerMetadata, \Magento\Customer\Api\Data\CustomerInterfaceFactory $customerDataFactory, \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter, \Magento\Framework\Api\DataObjectHelper $dataObjectHelper, array $data = []) { $this->options = $options; $this->_jsonEncoder = $jsonEncoder; $this->_systemStore = $systemStore; $this->_customerFormFactory = $customerFormFactory; $this->_accountManagement = $accountManagement; $this->_customerMetadata = $customerMetadata; $this->customerDataFactory = $customerDataFactory; $this->_extensibleDataObjectConverter = $extensibleDataObjectConverter; $this->dataObjectHelper = $dataObjectHelper; parent::__construct($context, $registry, $formFactory, $dataObjectProcessor, $data); }