Your IP : 216.73.216.43


Current Path : /var/www/www.indacotrentino.com/www/app/code/Amasty/Rewards/Model/Config/Source/
Upload File :
Current File : /var/www/www.indacotrentino.com/www/app/code/Amasty/Rewards/Model/Config/Source/CustomerGroups.php

<?php

declare(strict_types=1);

/**
 * @author Amasty Team
 * @copyright Copyright (c) 2023 Amasty (https://www.amasty.com)
 * @package Reward Points Base for Magento 2
 */

namespace Amasty\Rewards\Model\Config\Source;

use Magento\Customer\Model\ResourceModel\Group\CollectionFactory;
use Magento\Framework\Data\OptionSourceInterface;

class CustomerGroups implements OptionSourceInterface
{
    /**
     * @var CollectionFactory
     */
    private $customerGroupCollectionFactory;

    public function __construct(CollectionFactory $customerGroupCollectionFactory)
    {
        $this->customerGroupCollectionFactory = $customerGroupCollectionFactory;
    }

    /**
     * @return array
     */
    public function toOptionArray(): array
    {
        return $this->customerGroupCollectionFactory->create()->load()->toOptionArray();
    }
}