Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Services.php
Go to the documentation of this file.
1 <?php
13 
15 {
19  protected $_template = 'Magento_CurrencySymbol::system/currency/rate/services.phtml';
20 
25 
31  public function __construct(
32  \Magento\Backend\Block\Template\Context $context,
33  \Magento\Directory\Model\Currency\Import\Source\ServiceFactory $srcCurrencyFactory,
34  array $data = []
35  ) {
36  $this->_srcCurrencyFactory = $srcCurrencyFactory;
37  parent::__construct($context, $data);
38  }
39 
45  protected function _prepareLayout()
46  {
47  $this->setChild(
48  'import_services',
49  $this->getLayout()->createBlock(
50  \Magento\Framework\View\Element\Html\Select::class
51  )->setOptions(
52  $this->_srcCurrencyFactory->create()->toOptionArray()
53  )->setId(
54  'rate_services'
55  )->setClass(
56  'admin__control-select'
57  )->setName(
58  'rate_services'
59  )->setValue(
60  $this->_backendSession->getCurrencyRateService(true)
61  )->setTitle(
62  __('Import Service')
63  )
64  );
65 
66  return parent::_prepareLayout();
67  }
68 }
__()
Definition: __.php:13
__construct(\Magento\Backend\Block\Template\Context $context, \Magento\Directory\Model\Currency\Import\Source\ServiceFactory $srcCurrencyFactory, array $data=[])
Definition: Services.php:31