Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Countries.php
Go to the documentation of this file.
1 <?php
7 
11 
15 class Countries extends Select
16 {
20  private $countryHelper;
21 
29  public function __construct(Context $context, Country $countryHelper, array $data = [])
30  {
31  parent::__construct($context, $data);
32  $this->countryHelper = $countryHelper;
33  }
34 
40  protected function _toHtml()
41  {
42  if (!$this->getOptions()) {
43  $this->setOptions($this->countryHelper->getCountries());
44  }
45  return parent::_toHtml();
46  }
47 
54  public function setInputName($value)
55  {
56  return $this->setName($value);
57  }
58 }
__construct(Context $context, Country $countryHelper, array $data=[])
Definition: Countries.php:29
$value
Definition: gender.phtml:16