init
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user