* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ declare(strict_types=1); namespace PrestaShop\PrestaShop\Core\Form\ChoiceProvider; use PrestaShop\PrestaShop\Adapter\Entity\Gender; use PrestaShop\PrestaShop\Core\Form\FormChoiceProviderInterface; use Symfony\Contracts\Translation\TranslatorInterface; /** * Class GenderProvider provides genders choices. */ class GenderChoiceProvider implements FormChoiceProviderInterface { /** * @var TranslatorInterface */ private $translator; public function __construct(TranslatorInterface $translator) { $this->translator = $translator; } /** * Get currency choices. * * @return array */ public function getChoices(): array { return [ $this->translator->trans('Male', [], 'Admin.Shopparameters.Feature') => Gender::TYPE_MALE, $this->translator->trans('Female', [], 'Admin.Shopparameters.Feature') => Gender::TYPE_FEMALE, $this->translator->trans('Other', [], 'Admin.Shopparameters.Feature') => Gender::TYPE_OTHER, ]; } }