BmlApiWizard.php 942 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Paypal\Block\Adminhtml\System\Config;
  7. class BmlApiWizard extends ApiWizard
  8. {
  9. /**
  10. * Path to block template
  11. */
  12. const WIZARD_TEMPLATE = 'Magento_Paypal::system/config/bml_api_wizard.phtml';
  13. /**
  14. * Get the button and scripts contents
  15. *
  16. * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
  17. * @return string
  18. */
  19. protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element)
  20. {
  21. $originalData = $element->getOriginalData();
  22. $this->addData(
  23. [
  24. 'button_label' => __($originalData['button_label']),
  25. 'button_url' => $originalData['button_url'],
  26. 'html_id' => $element->getHtmlId(),
  27. ]
  28. );
  29. return $this->_toHtml();
  30. }
  31. }