* @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\Core\Domain\Product\ValueObject\ProductCondition; use PrestaShop\PrestaShop\Core\Form\FormChoiceProviderInterface; use Symfony\Contracts\Translation\TranslatorInterface; final class ProductConditionChoiceProvider implements FormChoiceProviderInterface { /** * @var TranslatorInterface */ private $translator; /** * @param TranslatorInterface $translator */ public function __construct( TranslatorInterface $translator ) { $this->translator = $translator; } /** * {@inheritDoc} */ public function getChoices() { return [ $this->translator->trans('New', [], 'Admin.Catalog.Feature') => ProductCondition::NEW, $this->translator->trans('Used', [], 'Admin.Catalog.Feature') => ProductCondition::USED, $this->translator->trans('Refurbished', [], 'Admin.Catalog.Feature') => ProductCondition::REFURBISHED, ]; } }