26 lines
620 B
PHP
26 lines
620 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace Esun\ContactPopup\Block;
|
|
|
|
use Magento\Directory\Model\ResourceModel\Country\CollectionFactory;
|
|
use Magento\Framework\View\Element\Template;
|
|
|
|
class Modal extends Template
|
|
{
|
|
public function __construct(
|
|
Template\Context $context,
|
|
private readonly CollectionFactory $countryCollectionFactory,
|
|
array $data = []
|
|
) {
|
|
parent::__construct($context, $data);
|
|
}
|
|
|
|
public function getCountryOptions(): array
|
|
{
|
|
return $this->countryCollectionFactory->create()
|
|
->loadByStore()
|
|
->toOptionArray(false);
|
|
}
|
|
}
|