Base.php 937 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. /**
  7. * Backend model for base currency
  8. */
  9. namespace Magento\Directory\Block\Adminhtml\Frontend\Currency;
  10. class Base extends \Magento\Config\Block\System\Config\Form\Field
  11. {
  12. /**
  13. * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
  14. * @return string
  15. */
  16. public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element)
  17. {
  18. if ($this->getRequest()->getParam('website') != '') {
  19. $priceScope = $this->_scopeConfig->getValue(
  20. \Magento\Store\Model\Store::XML_PATH_PRICE_SCOPE,
  21. \Magento\Store\Model\ScopeInterface::SCOPE_STORE
  22. );
  23. if ($priceScope == \Magento\Store\Model\Store::PRICE_SCOPE_GLOBAL) {
  24. return '';
  25. }
  26. }
  27. return parent::render($element);
  28. }
  29. }